• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Making an NSConnection from a BSD socket
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Making an NSConnection from a BSD socket (From: John Scalo <email@hidden>)
 >Re: Making an NSConnection from a BSD socket (From: Douglas Davidson <email@hidden>)
 >Re: Making an NSConnection from a BSD socket (From: John Scalo <email@hidden>)
 >Re: Making an NSConnection from a BSD socket (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: Developer Resource site
  • Next by Date: Re: Developer Resource site
  • Previous by thread: Re: Making an NSConnection from a BSD socket
  • Next by thread: Follow-up to NSDictionary's isEqualToDictionary: method
  • Index(es):
    • Date
    • Thread