Enumeration Case

NSNetServiceListenForConnections

Declaration

NSNetServiceListenForConnections = 1UL << 1

Discussion

Specifies that a TCP listener should be started for both IPv4 and IPv6 on the port specified by this service. If the listening port can't be opened, the service calls its delegate’s netService:didNotPublish: method to report the error.

The listener supports only TCP connections. If the service’s type does not end with _tcp, publication fails with NSNetServicesBadArgumentError.

Whenever a client connects to the listening socket, the service calls its delegate’s netService:didAcceptConnectionWithInputStream:outputStream: method with a pair of NSStream objects.