Hello,
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.

Thanks,
Charles


NSSocketPort *sendPort = [[NSSocketPort alloc] initRemoteWithTCPPort:3600 
host:@"test.myhost.com<http://test.myhost.com>"];
NSConnection *connection = [NSConnection connectionWithReceivePort:nil 
sendPort:sendPort];


[connection setRequestTimeout:10.0];
[connection setReplyTimeout:10.0];


NSLog(@"theConnection 0x%X", connection);
NSLog(@"Connect is valid? %d", (int)[connection isValid]);
_______________________________________________

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