Re: Detecting network change
Re: Detecting network change
- Subject: Re: Detecting network change
- From: Greg <email@hidden>
- Date: Thu, 23 Oct 2008 16:31:32 -0400
On Oct 21, 2008, at 4:56 PM, Jens Alfke wrote:
Use SystemConfiguration.framework to register for notifications when
the network configuration changes. There's sample code for both Mac
and iPhone showing how to use it.
Note that this isn't magic — it will tell you if the user unplugged
Ethernet from the computer, but not if he unplugs the router's
Ethernet connection, or if workmen down the street accidentally cut
his cable, or the ISP's routers go down, or your server crashes,
etc. In other words, it tells you about things that happen on the
computer, not elsewhere along the network.
—Jens
OK, I've finally had a chance to work on this some, and I found two
sample projects:
SimpleReach (normal) and Reachability (iPhone specific)
Neither example detects when the "network changes". They seem to
detect when the network goes down, or up, but not if I hop from say,
one access point to another (thereby getting a different IP address),
which is what I need to be able to do.
After looking through the SystemConfiguration documentation a bit, as
well as the sample code, I'm not sure if I saw anything that would
enable me to do this...
Help?
Thanks again,
- Greg _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden