Re: Making an NSConnection from a BSD socket
Re: Making an NSConnection from a BSD socket
- Subject: Re: Making an NSConnection from a BSD socket
- From: John Scalo <email@hidden>
- Date: Fri, 26 Mar 2004 13:55:54 -0800
Right you are. The other problem was that I needed to use the analogous
initRemoteWithProtocolFamily on the client side. But going this route
of reusing ports opened another can of worms where the connections were
well, reused, but in an unpredictable way. e.g. if a second user fast
switched in and ran the server program, messages to the connection
would still go to the first user even though I have the connection
invalidated/closed/released upon the
NSWorkspaceSessionDidResignActiveNotification in the first user.
So...I've eventually settled on dynamic private ports, which is fine
except I'm still going to have to cross this bridge at some point when
I want this to work across the Internet.
~ John
On Mar 26, 2004, at 9:47 AM, Douglas Davidson wrote:
On Mar 25, 2004, at 6:42 PM, John Scalo wrote:
Thanks Douglas. That sounds promising. When I set up the NSSocketPort
that way, everything happens error-free on the server side, but the
client (different computer, local network) hangs when trying to get
the proxy for the connection the first time (actually it times out
eventually).
If you create the socket yourself I believe you need to do the
listen() as well as the bind().
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.