• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Detecting network disconnected
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Detecting network disconnected
      • From: Quinn <email@hidden>
    • Re: Detecting network disconnected
      • From: "Justin C. Walker" <email@hidden>
  • Prev by Date: Method for getting a list of available AirPort / WiFi networks?
  • Next by Date: res_search result parsing
  • Previous by thread: Method for getting a list of available AirPort / WiFi networks?
  • Next by thread: Re: Detecting network disconnected
  • Index(es):
    • Date
    • Thread