• 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 an active Internet connection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

detecting an active Internet connection


  • Subject: detecting an active Internet connection
  • From: Donald Hall <email@hidden>
  • Date: Mon, 25 Oct 2004 23:54:27 -0600

Looking back in the archives of this list, I have found several schemes using

SCNetworkCheckReachabilityByName()

to attempt to determine if the Internet was reachable without actually triggering a connection attempt.

It seems to me that using "ping" through an NSTask would also work. When I try

ping -c1 www.apple.com

with a dialup connection, an error (unknown host) is returned if I am not connected (and therefore www.apple.com is not reachable). No attempt is made to automatically activate my modem and dial out even if I have selected automatically connect in Network preferences.

Any comments? Am I missing something?

Thanks,

Don
--
Donald S. Hall, Ph.D.
Apps & More Software Design, Inc.
email@hidden
http://www.appsandmore.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: detecting an active Internet connection
      • From: Evan Schoenberg <email@hidden>
  • Prev by Date: Re: KVO of nested objects
  • Next by Date: Dealing with Resource Forks
  • Previous by thread: Re: encryption and hash api
  • Next by thread: Re: detecting an active Internet connection
  • Index(es):
    • Date
    • Thread