Re: Bonjour Via Peer-Peer WIFI - Reachability Issue
Re: Bonjour Via Peer-Peer WIFI - Reachability Issue
- Subject: Re: Bonjour Via Peer-Peer WIFI - Reachability Issue
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Tue, 11 Nov 2014 17:59:35 +0000
On 11 Nov 2014, at 17:15, Jens Alfke <email@hidden> wrote:
> I've been using the SystemConfiguration reachability API in various incarnations for a long time (since iChat I think) and I've tended to use it as a preflight, i.e. wait for the green light from reachability before trying to open a connection.
Preflighting is almost always a mistake. The problem is that it's /really/ hard to tell whether a connection will succeed. The only way to know for sure is to try it. Doing a reachability preflight never helps because:
o reachability saying "yes" doesn't mean the connection will succeed (obviously), so you still have to deal with errors anyway
o reachability saying "no" doesn't guarantee that the connection will fail
This last one is a kicker because you're actively preventing folks from trying something that might have actually worked.
Reachability is good for guiding your retry policy and for improving error status in the event of an actual failure, but don't preflight connections.
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
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