On 24 févr. 2015, at 18:05, Jens Alfke wrote:

> 
>> On Feb 24, 2015, at 8:58 AM, Jens Alfke <[email protected]> wrote:
>> 
>> 
>>> On Feb 24, 2015, at 2:29 AM, Stéphane Sudre <[email protected]> wrote:
>>> 
>>> Instead of polling, another solution depending on the nature of the 
>>> unreachability could be to observe network settings changes (DNS, IP, 
>>> Active Interface, etc.) using the SystemConfiguration Dynamic Store API.
>> 
>> That’s exactly what the SCReachability implementation is supposedly doing 
>> for us.

I'm wondering whether it's not better to use the Dynamic Store API because:

- the store callbacks are probably sent before the reachability ones and so you 
can try connecting again sooner
- you may get store callbacks that do not mean the network connection is back 
but yet, between the time you receive the callback and the time you try 
connecting again, everything is working, and so your connection will succeed.

But you're right, it's better to use the SCNetworkReachability API. I always 
forget that there are callbacks with this API.

> Oops, forgot to add: And there are a lot of sources of unreachability that 
> are not visible directly to the device, so SystemConfiguration can’t notify 
> about them being resolved. For example, an intermediate router going up/down, 
> a remote link failure, a DNS server being updated.

I agree, that's the reason why I mentioned "depending on the nature of the 
unreachability".



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to