Contents

portForName:host:

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

Declaration

- (NSPort *) portForName:(NSString *) name host:(NSString *) host;

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”). If hostName is nil or empty, the local host is checked.

Return Value

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

Discussion

Invokes portForName:host:nameServerPortNumber: with 0 as the name server port number.

See Also

Looking up Ports