This is just a quick question for anyone who may know (or, at least I
hope it's quick)
If I declare a port:
port = [ [NSSocketPort alloc] initRemoteWithTCPPort:portNumber
host:hostName ] ;
And use it with an NSConnection, it works.
If I use that same port in any other way (such as NSFileHandle) it
doesn't work. The error it gives is:
[NSConcreteFileHandle writeData:]: Bad file descriptor
(when I use initWithFileDescriptor:port.socket )
However, if I create a port like this:
port = [ [NSSocketPort alloc] initWithTCPPort:portNumber ] ;
(and add it to the port manager, run loops, etc of course)
NSFileHandle suddenly works (as a server)
Ideally, I'd like to be able to use NSFileHandle (or something very
similar) on both ends of the connection.
Any thoughts/suggestions?
Finding anything useful for what I'm trying to do online has proven to
be almost completely futile...
- Christopher
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com