[En-Nut-Discussion] media sense/cable detect

Harald Kipp harald.kipp at egnite.de
Wed Sep 17 09:56:53 CEST 2003


Hi Damian,


>has anyone looked at media sense to detect if the cable is unplugged, like 
>Windows2000/XP?
>
>When the cable is unplugged all TCP connections can be flaged as closed.

Does Windows do this?

TCP rules define, that a connection should _not_ be closed on lower
level problems. The application may close the connection on
transmit failures.

If one node is receiving and the remote is switched off, the
receiver will never detect the loss. It may use a socket timeout
(supported by Nut/Net) or set the KEEPALIVE option (not supported
by Nut/Net).

Beside that, it would still make a lot of sense to detect a link
loss, but I never tried. Anyone else?

Harald




More information about the En-Nut-Discussion mailing list