Re: Implementing a TCP port listener in Cocoa
Re: Implementing a TCP port listener in Cocoa
- Subject: Re: Implementing a TCP port listener in Cocoa
- From: Douglas Davidson <email@hidden>
- Date: Wed, 28 Jun 2006 15:00:52 -0700
Is there something wrong with using NSSocketPort and asynchronous
callbacks with NSFileHandle? Assuming serverSocket and
serverHandle are instance variables, something like:
serverSocket = [[NSSocketPort alloc] initWithTCPPort:myPortNumber];
serverHandle = [[NSFileHandle alloc] initWithFileDescriptor:
[serverSocket socket] closeOnDealloc:YES];
This isn't what NSSocketPort is for. I'd recommend creating and
binding the socket directly if you're going to use it with NSFileHandle.
Douglas Davidson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden