Type Method 型メソッド

connectionWithRegisteredName:host:

Returns the NSConnection object whose send port links it to the NSConnection object registered with the default NSPortNameServer under a given name on a given host. NSConnectionオブジェクトを返します、それの送信ポートはそれをNSConnectionオブジェクトで、省略時のNSPortNameServerに対してある与えられたホスト上である与えられた名前のもとに登録されるものと連結します。

Declaration 宣言

+ (instancetype)connectionWithRegisteredName:(NSString *)name 
                                        host:(NSString *)hostName;

Parameters パラメータ

name

The name of an NSConnection object. NSConnectionオブジェクトの名前。

hostName

The name of the host. The domain name hostName is an Internet domain name (for example, “sales.anycorp.com”). If hostName is nil or empty, then only the local host is searched for the named NSConnection object. ホストの名前。ドメイン名hostNameはインターネットドメイン名です(例えば、“sales.anycorp.com”)。hostNamenilまたは空ならば、そのときローカルホストだけがこの指名されたNSConnectionオブジェクトに対して検索されます。

Return Value 戻り値

The NSConnection object whose send port links it to the NSConnection object registered with the default NSPortNameServer under name on the host named hostName. Returns nil if no NSConnection object can be found for name and hostName. NSConnectionオブジェクト、それの送信ポートはそれを、省略時のNSPortNameServernameのもとhostNameと名前をつけられるホスト上で登録されるNSConnectionオブジェクトに連結します。nilを返します、もしまったくNSConnectionオブジェクトがnamehostNameに対して見つけられることができないならば。

The returned NSConnection object is a child of the default NSConnection object for the current thread (that is, it shares the default NSConnection object's receive port). 返されるNSConnectionオブジェクトは、現在のスレッドに対する省略時のNSConnectionオブジェクトの子です(すなわち、それは省略時のNSConnectionオブジェクトのもつ受信ポートを共有します)。

Discussion 議論

To get the object vended by the NSConnection object, use the rootProxy instance method. The rootProxyForConnectionWithRegisteredName:host: class method immediately returns this object. NSConnectionオブジェクトによって販売されるオブジェクトを取得するには、rootProxyインスタンスメソッドを使ってください。rootProxyForConnectionWithRegisteredName:host:クラスメソッドはこのオブジェクトを直ぐに返します。

See Also 参照

Getting a Remote Object リモートオブジェクトを取得する

Related Documentation 関連文書