Re: Creating an NSSocketPort on an available port?
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