Contents

portForName:host:nameServerPortNumber:

Looks up and returns the port registered under the specified name on a specified host.

Declaration

- (NSPort *) portForName:(NSString *) name host:(NSString *) host nameServerPortNumber:(uint16_t) portNumber;

Parameters

  • name:

    The name of the desired port.

  • host:

    The name of the host. hostName is an Internet domain name (for example, “sales.anycorp.com”) or IP address (IPv4 or IPv6). If hostName is nil or empty, the local host is checked. If hostName is @”*”, all hosts on the local network are checked.

  • portNumber:

    The portNumber parameter is ignored.

Return Value

The port associated with portName on the host hostName. Returns nil if no such port exists.

See Also

Related Documentation

Looking up Ports