• 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
Re: Are you on-line?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Are you on-line?


  • Subject: Re: Are you on-line?
  • From: Markus Hitter <email@hidden>
  • Date: Thu, 1 Nov 2001 09:45:45 +0100

Am Donnerstag den, 1. November 2001, um 07:40, schrieb Johnny CN Lee:

However, I may be on the road and off-line. So I want this app can check if I'm on-line before connecting to the remote server and get errors.

Even if you are "online", your connection attempt can fail, so you have to be prepared to handle this anyway. Simply waiting for a connection won't take up much resources.

Try to ping two different servers. If one goes and the other fails, you detected trouble. Or ping your router at home, which is very unlikely to go down but would respond to pings.

Then, there is SCNetworkCheckReachabilityByName(); which detects wether the internal modem needs to dial to get a connection. You can ask Chad Jones from Apple DTS for a code snippet.



Hope that helps,

Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/


References: 
 >Re: Are you on-line? (From: Johnny CN Lee <email@hidden>)

  • Prev by Date: Re: Are you on-line?
  • Next by Date: Re: cocoa-dev digest, Vol 1 #791 - 13 msgs
  • Previous by thread: Re: Are you on-line?
  • Next by thread: Re: cocoa-dev digest, Vol 1 #791 - 13 msgs
  • Index(es):
    • Date
    • Thread