Re: How can I tell if a port is already being used?
Re: How can I tell if a port is already being used?
- Subject: Re: How can I tell if a port is already being used?
- From: Brian Stibi <email@hidden>
- Date: Wed, 27 Dec 2006 12:04:13 -0800
Greetings,
Okay, gotta Poka-yoke my code.
So I reworked my code like so....
- (void)newConnection:(NSNotification *)notification
{
NSDictionary *userInfo = [notification userInfo];
NSFileHandle *remoteFileHandle = [userInfo
objectForKey:NSFileHandleNotificationFileHandleItem];
NSNumber *errorNo = [userInfo objectForKey:@"NSFileHandleError"];
if( errorNo )
{
NSLog(@"NSFileHandle Error: %@", errorNo);
return;
}
........
When I attempt to connect to a used port I log...
2006-12-27 11:41:24.749 xxxxxx[4814] NSFileHandle Error: 38
The docs say about NSFileHandleError....
"An NSNumber object containing an integer representing the UNIX-type
error which occurred."
Where can I find a meaningful representation of the UNIX-type errors.
Thanks,
- Brian
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden