Incorporating Rendezvous into Your Cocoa Applications, Part 2
Subject:   Cocoa Port Allocation
Date:   2003-07-16 09:36:21
From:   anonymous2
I have been trying similar things. The Apple sample code uses lowlevel bsd functions which I think look a little messy when it can be done using cocoa. My problem is querying a NSSocketPort to find it's port.
for example;

sP = [[NSSocketPort alloc]initWithTCPPort:0];

will allocate a NSSocketPort with an available TCP port (unlike your example that will fail if that port is already taken)

but to advertise the port with NSNetService, the tcp port must be known.

anybody, any ideas?

1 to 1 of 1
  1. Cocoa Port Allocation
    2003-10-26 02:34:13  rjimlad [View]

1 to 1 of 1