Re: Checking for internet connection?
Re: Checking for internet connection?
- Subject: Re: Checking for internet connection?
- From: Ben Dougall <email@hidden>
- Date: Sat, 14 Oct 2006 22:06:56 +0100
On Saturday, October 14, 2006, at 10:00 pm, Shawn Erickson wrote:
On Oct 14, 2006, at 1:11 PM, Ben Dougall wrote:
On Saturday, October 14, 2006, at 08:50 pm, j o a r wrote:
On 14 okt 2006, at 21.37, Ben Dougall wrote:
I'm trying to find out how to get the information that the Internet
Connect app has access to and displays, specifically
"connected"/"disconnected" plus the speed and time in seconds
connected.
But that status is for "transient" connections (like a modem
connection), right? I think (by looking at the API, I haven't tried
it) that you can use the System Configuration APIs for some of that,
at least the connected / disconnected state,
I can't see one that does that. The closest two functions that I know
of, SCNetworkCheckReachabilityByAddress and
SCNetworkCheckReachabilityByName, require a particular host to try
rather than just saying yes connected, or no not connected.
<http://developer.apple.com/documentation/Networking/Conceptual/
SystemConfigFrameworks/SC_ReachConnect/chapter_5_section_5.html>
-Shawn
Thanks but that's the page I talked about to start with:
On Saturday, October 14, 2006, at 12:56 pm, Ben Dougall wrote:
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+)?
_______________________________________________
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