This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MCU-PLUS-SDK-AM243X: How to activate TCP keep alive mechanism

Part Number: MCU-PLUS-SDK-AM243X


Tool/software:

Hi,

How can I activate the keep alive mechanism on the TCP server example ?

I get no event when TCP client ungracefully disconnects. (Cable unplugged - or client software crashes)

I've tried to use socket options

if (setsockopt(socket, IPPROTO_TCP, TCP_KEEPIDLE, &keepidle, sizeof(keepidle)) < 0) ... 

but it always fails.

Thanks,

Eli