detecting an active Internet connection
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