• 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: Creating an NSSocketPort on an available port?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating an NSSocketPort on an available port?


  • Subject: Re: Creating an NSSocketPort on an available port?
  • From: "Kyle Sluder" <email@hidden>
  • Date: Tue, 11 Mar 2008 03:38:28 -0400

On Tue, Mar 11, 2008 at 3:14 AM, Mac QA <email@hidden> wrote:
>  The NSSocketPort class doesn't seem to have a way to get the port when
>  you just alloc & init like this. So How can you advertise over Bonjour
>  for a generic dynamically determined port selected at runtime?

Grab the underlying socket's fd using -[NSSocketPort socket], and then
use getsockname(2) to get at its sockaddr structure.

--Kyle Sluder
_______________________________________________

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

References: 
 >Creating an NSSocketPort on an available port? (From: "Mac QA" <email@hidden>)

  • Prev by Date: Creating an NSSocketPort on an available port?
  • Next by Date: Re: Creating an NSSocketPort on an available port?
  • Previous by thread: Creating an NSSocketPort on an available port?
  • Next by thread: Re: Creating an NSSocketPort on an available port?
  • Index(es):
    • Date
    • Thread