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

registerName:

Registers the specified service using with the default system port name server. 指定されたサービスを、省略時のシステムポート名サーバとともに使うことで登録します。

Declaration 宣言

- (BOOL)registerName:(NSString *)name;

Parameters パラメータ

name

The name under which to register the receiver. それのもとこのレシーバを登録することになる名前。

Return Value 戻り値

YES if the operation was successful, otherwise NO (for example, if another NSConnection object on the same host is already registered under name). YES、もし演算が成功であるならば、そうでなければNO(例えば、別のNSConnectionオブジェクトが同じホスト上で既にnameのもと登録されるならば)。

Discussion 議論

This method connects the receive port of the receiving NSConnection object with the specified service name. It registers the name using the port name server returned by the systemDefaultPortNameServer method of NSPortNameServer. If the operation is successful, other NSConnection objects can contact the receiver using the connectionWithRegisteredName:host: and rootProxyForConnectionWithRegisteredName:host: class methods. このメソッドは、受け取っているNSConnectionオブジェクトの受信ポートにこの指定されたサービス名で接続します。それはこの名前をNSPortNameServersystemDefaultPortNameServerメソッドによって返されるポート名サーバを使って登録します。演算が成功するならば、他のNSConnectionオブジェクトはレシーバにconnectionWithRegisteredName:host:rootProxyForConnectionWithRegisteredName:host:クラスメソッドを使って連絡します。

If the receiver was already registered under a name and this method returns NO, the old name remains in effect. If this method is successful, it also unregisters the old name. レシーバが既にある名前のもと登録されたそしてこのメソッドがNOを返すならば、古い名前は有効なままです。このメソッドが成功するならば、それはまた古い名前を登録解除します。

To unregister an NSConnection object, simply invoke registerName: and supply nil as the connection name. Unregistering is currently only supported for NSSocketPort-based connections. NSConnectionオブジェクトを登録解除するには、単純にregisterName:を発動してnilを接続名として提供してください。登録解除は、現在NSSocketPort基盤の接続に対してサポートされるだけです。

See Also 参照

Vending a Service サービスの販売

Related Documentation 関連文書