Instance Method インスタンスメソッド

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 パラメータ

portName

The name of the desired port. 望むポートのもつ名前。

hostName

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. ホストの名前。hostNameはインターネットドメイン名です(例えば、“sales.anycorp.com”)。hostNamenilまたは空ならば、ローカルホストが調べられます。

Return Value 戻り値

The port associated with portName on the host hostName. Returns nil if no such port exists. ホストhostName上でportNameと結び付けられたポート。nilを返します、もしそのようなポートが存在しないならば。

Discussion 議論

Invokes portForName:host:nameServerPortNumber: with 0 as the name server port number. portForName:host:nameServerPortNumber:を、ネームサーバポート番号として0で発動してください。

See Also 参照

Looking up Ports ポートを調べる