On Sep 4, 2010, at 7:11 PM, Jeremy Matthews <jeremymatth...@mac.com> wrote:
> In my application (desktop) I am checking for a network connection, and I've > seen people use a few different techniques... > > 1) NSURL > 2) SCNetworkReachabaility > 3) NSSocketPort > > Anyone have experience or best practices on using one vs another? > The ONLY way to determine if you can connect to a host is to actually try the connection. "Reachability" is a fast way to check if there's a potential route to the host from any of the interfaces on the machine. If the machine is connected to a properly configured router, this answer will always be yes even if the host is down or the router isn't connected to the Internet. NSURL and NSSocketPort are just network connection APIs operating at different layers of abstraction. --Kyle Sluder_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com