• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Reachability determination?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reachability determination?


  • Subject: Re: Reachability determination?
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 23 Feb 2015 17:12:22 -0800


On Feb 23, 2015, at 4:20 PM, Rick Mann <email@hidden> wrote:

I thought I've read in the past that we shouldn't use SCNetworkReachability to determine reachability, but to actually just try to connect to our servers, and if that fails, then do something.
What is that something? Looking at the SCNetworkReachability Reference, there's no mention of this usage.

We’ve been struggling with this too. As far as I know, the basic logic is that if the failure "looks like" it could be caused by an unreachable host, set a timer and retry periodically (probably with an exponential backoff.) Meanwhile, run a reachability observer, and if it’s told that the host became reachable, abort the timer and retry right now.

The “looks like” test seems to be a heuristic where you check various error codes in various NSError domains. The ones we look for currently are NSURLErrorDNSLookupFailed, NSURLErrorNotConnectedToInternet, NSURLErrorInternationalRoamingOff; but my colleague who’s working on this problem has probably added a few more that I haven’t seen yet…

—Jens
 _______________________________________________
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

References: 
 >Reachability determination? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: HTTP/2 support in OS X?
  • Next by Date: Re: HTTP/2 support in OS X?
  • Previous by thread: Reachability determination?
  • Next by thread: Re: Reachability determination?
  • Index(es):
    • Date
    • Thread