Re: NSSocketPort == BSD Socket
Re: NSSocketPort == BSD Socket
- Subject: Re: NSSocketPort == BSD Socket
- From: Kirk Kerekes <email@hidden>
- Date: Thu, 4 Dec 2008 18:52:45 -0600
-[NSSocketPort socket] returns a file descriptor. Write to it.
Init an NSFileHandle with it. (-[NSFileHandle initWithFileDescriptor:])
It's all just sockets/files/descriptors.
But "raw messaging" is not the same as writing raw bytes to a TCP
stream. All that means is that you can use the standard NSPort API as
well as using it to set up an NSConnection.
You say that you've used it to talk to sockets on other platforms.
How? The API is completely non-suitable for it. It doesn't give you a
way to simply read or write streams. Instead it deals with arrays of
messages. This is going to require some sort of custom framing
protocol which means that it's not going to be able to talk to
anything that doesn't also use that custom framing protocol. How do
you get around that limitation?
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden