• 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
Making an NSConnection from a BSD socket
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Making an NSConnection from a BSD socket


  • Subject: Making an NSConnection from a BSD socket
  • From: John Scalo <email@hidden>
  • Date: Thu, 25 Mar 2004 17:39:29 -0800

I need to set some options on a BSD socket via setsockopt before binding it (otherwise setsockopt has no effect). I then want to use this socket to create an NSConnection. Is there any way to create an NSConnection from a BSD socket rather than an NSSocketPort? Or some way to turn a raw BSD socket into an NSSocketPort after it's created via socket() but before bind() ? The problem with using NSSocketPorts is that when you initialize them, they also get bound so there's no chance to set any socket options.

BTW, the option I'm setting is SO_REUSEPORT so that if the process dies with an active connection, it won't take 10 minutes before a new process can create a new connection with the same port #. It sure would be nice if NSSocketPort had an initWithTCPPort: options: method!

Thanks!

~ John
_______________________________________________
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.


  • Follow-Ups:
    • Re: Making an NSConnection from a BSD socket
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Re: Vending a proxy problems
  • Next by Date: Follow-up to NSDictionary's isEqualToDictionary: method
  • Previous by thread: [ANN]: AutoDoc Face
  • Next by thread: Re: Making an NSConnection from a BSD socket
  • Index(es):
    • Date
    • Thread