On 11 Nov 2014, at 17:15, Jens Alfke <j...@mooseyard.com> 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 (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com This email sent to arch...@mail-archive.com