Re: Detecting network change
Re: Detecting network change
- Subject: Re: Detecting network change
- From: Greg <email@hidden>
- Date: Thu, 23 Oct 2008 17:34:48 -0400
On Oct 23, 2008, at 5:14 PM, Shawn Erickson wrote:
You have the ability to watch values in the dynamic store and get
notifications (callbacks) when they change. Review the document I
linked for information about notifications and also the schema so you
know what keys to watch / probe.
Also look at the following API...
SCDynamicStoreCreateWithOptions / SCDynamicStoreCreate
SCDynamicStoreCreateRunLoopSource
SCDynamicStoreSetNotificationKeys
-Shawn
Thanks Shawn, I'll have a look at that (if you happen to know off hand
which key I need to watch let me know). Allan also sent me this
information:
On Oct 23, 2008, at 4:43 PM, Allan Nathanson wrote:
The SCNetworkReachabilityCreateWithAddressPair() API will post a
notification if the reachability of the destination (peer) address
changes OR if the local IP address changes.
- Allan
These seem to be two different approaches to solving the problem...
I'll investigate both, I like
SCNetworkReachabilityCreateWithAddressPair() because the
"Reachability" sample iPhone project uses the similar function
SCNetworkReachabilityCreateWithAddress(), and it seems a bit more of a
direct approach.
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