On Apr 8, 2011, at 3:26 PM, Heizer, Charles wrote:

> What is the best way to test to see if a TCP port is reachable and will 
> answer connections? I was trying to use NSSocketPort and NSConnection but I'm 
> not getting a valid connection.

You have to connect to it. Unfortunately, neither NSSocketPort nor NSConnection 
attempt to connect until you send data, so with those, you have no way of 
immediately knowing that anything is actually listening. The best way is to get 
down a level and use socket(2) and friends.

-- 
Dave Carrigan
d...@openshut.net
Seattle, WA, USA

_______________________________________________

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

Reply via email to