This port name server takes and returns instances of NSSocketPort.
- macOS 10.0+
Port removal functionality is supported by the
remove method and should be used to remove invalid socket ports.
Unlike the other port name servers, NSSocketPortNameServer can operate over a network. By registering your socket ports, you make them available to other computers on the local network without hard-coding the TCP port numbers. Clients just need to know the name of the port.
NSPortNameServer is implemented using
NSNet and registers ports in the local network domain. The registered name of a port must be unique within the local domain, not just the local host. The name server only supports TCP/IP (either IPv4 or IPv6) sockets.