Detecting network disconnected
Detecting network disconnected
- Subject: Detecting network disconnected
- From: Larry Gerndt <email@hidden>
- Date: Thu, 29 May 2003 10:04:58 -0700
When using BSD sockets, what's the right way of detecting that the user has
disconnected his Mac from the network (i.e. pulled the plug)?
What I'm seeing is that even when the plug is pulled, the socket happily
continues allowing writes and when I plug the cable back in, those writes
succeed. While that is, I'm sure, intended behavior, and is very useful, it
prevents me from being able to detect that I'm not actually connected.
I tried setting a 10-second timeout on the socket writes, but of course that
timeout never happens because the writes succeed even when the cable is
disconnected.
--
Larry Gerndt
AIM Handle: SonOfTheSonOfMan
Let the truth be told though the heavens fall -- James Garrison
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.