On May 16, 2014, at 13:00 , Ian Ragsdale <[email protected]> wrote:

> Sounds like the right thing to do is probably to do a check for reachability 
> on the zero address (as Apple does in their sample code for 
> reachabilityForInternetConnection), which should tell us if the radio is 
> active, and then if the radio is active, we can then make a request to verify 
> that the server is actually reachable. That way, we won't unnecessarily tax 
> the battery.



Ian,



        I've had a long conversation with Kevin, the author of Apple's 
Reachability code. (BTW, I have substantially improved it and added a few 
features, such as touching the of hosts, etc.) I have a blog post to that 
effect.

        Kevin would advise you to not listen on 0.0.0.0. You should listen on 
the address of a real host that you really want to connect with. (The fact that 
your DNS is frakked is a different question.) Checking for reachability on any 
address tells you nothing if you haven't tried to bring up the radios. You must 
attempt to bring them up first and then check reachability. The check alone 
does nothing of value.

        

Anon,
Andrew
____________________________________
Andrew W. Donoho
Donoho Design Group, L.L.C.
[email protected], +1 (512) 666-7596, twitter.com/adonoho

Download Retweever here: <http://Retweever.com>

No risk, no art.
        No art, no reward.
                -- Seth Godin



-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/34437A33-7EDE-4BB5-B1C0-FC4242E66C74%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to