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.

DaemonNew 函数设置为TCP模式,怎么设置检测网线断开的机制



我在dtask_tcp_hello函数中有设置

int keepalive = 1;

setsocket(s, SOL_SOCKET,SO_KEEPALIVE,(VOID)&keepalive,sizeof(keepalive));

但是当我把网线拔了,依然没有检测到。

该怎么检测我是把网线拔了。