Re: Using NSSocketPort
Re: Using NSSocketPort
- Subject: Re: Using NSSocketPort
- From: Douglas Davidson <email@hidden>
- Date: Mon, 22 Apr 2002 10:30:46 -0700
On Saturday, April 20, 2002, at 05:26 PM, Mike Laster wrote:
Does anyone have any sample code on how to use NSSocketPort? I'm
trying to
write a server and can't figure out how to accept connections.
NSSocketPort
seems to accept the connection if I telnet to the port, but the port
delegate is never called to inform my code about the new connection (or
give
me access to the port object representing the new connection).
I currently do all of my networking through homegrown wrappers around
the
BSD functions, but I would really like to find a way for the networking
data
to simply be events off of the NSRunLoop so I can have a cleaner
architecture.
That's not what NSSocketPort does. To use a BSD socket as a run loop
source, you can use CFSocket, in CoreFoundation. Another alternative is
NSFileHandle; there are also third-party frameworks and code examples
that do this.
Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.