• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How can I tell if a port is already being used?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How can I tell if a port is already being used?
      • From: Mike Blaguszewski <email@hidden>
    • Re: How can I tell if a port is already being used?
      • From: "R. Matthew Emerson" <email@hidden>
    • Re: How can I tell if a port is already being used?
      • From: j o a r <email@hidden>
  • Prev by Date: Re: Accessing files in QT Cache
  • Next by Date: Re: How can I tell if a port is already being used?
  • Previous by thread: Re: How can I tell if a port is already being used?
  • Next by thread: Re: How can I tell if a port is already being used?
  • Index(es):
    • Date
    • Thread