[En-Nut-Discussion] Detect Loss of Ethenet Conenction

Joerg.Lamprecht at kendro.spx.com Joerg.Lamprecht at kendro.spx.com
Mon Jul 19 16:55:19 CEST 2004


Hello, I have the following Problem:

I want to check if the physical connection to my Network (i.e. hub) or 
what ever is established. Till now I do this
by checking the "sock->so_state" every second in a Thread. So when the 
peer finsihes the connecting,I  get a TCPS_CLOSE_WAIT, break out of the 
loop, close my Socket and everything is fine.
But when I blackout my Hub(Switch) or disconnect the plug from the 
Hub(Switch), I get the  "sock->so_state" TCP_ESTABLISHED all the time. 
What I expect is something like TCPS_CLOSED ...
After that, I physical reestablish the conenction. Now I can not 
reconnect, because my Socket is still alive.
So how can I detect that I`ll have no physical conenction. (Interrupt or 
whatever)

Greetings from Jörg
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20040719/b7f1ea87/attachment-0001.html>


More information about the En-Nut-Discussion mailing list