Re: Best practices for interpreting network reachability flags?
Re: Best practices for interpreting network reachability flags?
- Subject: Re: Best practices for interpreting network reachability flags?
- From: Allan Nathanson <email@hidden>
- Date: Mon, 10 Sep 2007 10:09:10 -0400
On Sep 10, 2007, at 9:49 AM, Rich Siegel wrote:
On 9/10/07 at 8:17 AM, email@hidden (Allan Nathanson) wrote:
If you only check kSCNetworkFlagsReachable than your application may
attempt to use the network only to be blocked because the modem
service needs to be connected.
Yep, understood. Unfortunately, though: I'm having the opposite
problem: apparently I'm getting back (! (flags &
kSCNetworkFlagsReachable)) when the network is in fact connected and
running. Can you think of anything offhand that would explain that?
If the flags do not indicate kSCNetworkFlagsReachable than for some
reason we don't think that the target is currently network accessible.
Are you using SCNetworkReachabilityCreateWith(Name|Address|AddressPair)?
If you are using SCNetworkReachabilityCreateWithName are you also
using SCNetworkReachabilityScheduleWithRunLoop? If so, are you trying
to get the flags just after you scheduled? If so, the flags will
likely indicate not reachable while the DNS request is being processed
and you'll get a callback when the request completes and we find that
the flags changed and the target is reachable.
- Allan
_______________________________________________
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