Checking for internet connection?
Checking for internet connection?
- Subject: Checking for internet connection?
- From: Ben Dougall <email@hidden>
- Date: Sat, 14 Oct 2006 12:56:36 +0100
From a while back on this list:
On 2/17/06 9:24 AM, "Paul J. Lucas" <email@hidden> wrote:
Is there any way to check to see if there is an active internet
connection?
- Paul
On Friday, February 17, 2006, at 05:41 pm, Greg Herlihy wrote:
I'm not sure about a Cocoa API, but Core Foundation's System
Configuration
Framework's "Reachability" API can tell you:
http://developer.apple.com/documentation/Networking/Conceptual/
SystemConfigF
rameworks/SC_ReachConnect/chapter_5_section_4.html
Greg
The two functions on that page, SCNetworkCheckReachabilityByAddress and
SCNetworkCheckReachabilityByName (regarding pre 10.3), checks the
availability of another external host. That's really the best way to
see if the computer has a connection? Check to see if say Amazon are
contactable and from that assume that the machine you're on has a
connection? That's really crap I reckon. Surely there's a reasonable
way to find out if the machine is currently connected to the net or not
(OS X 10.2+)?
Thanks, Ben.
_______________________________________________
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