| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/Foundation.framework |
| Availability | Available in Mac OS X v10.0 and later. |
| Companion guide | |
| Declared in | NSPortNameServer.h |
This port name server takes and returns instances of NSMessagePort. Port removal functionality is not supported in NSMessagePortNameServer; if you want to cancel a service, you have to destroy the port (invalidate the NSMessagePort object given to registerPort:name:).
Returns the singleton instance of NSMessagePortNameServer.
+ (id)sharedInstance
The singleton instance of NSMessagePortNameServer with which you register and look up NSMessagePort objects.
NSPortNameServer.hReturns the NSPort object registered under a given name on the local host.
- (NSPort *)portForName:(NSString *)portName
The port name.
The NSPort registered under portName on the local host Returns nil if a port named portName does not exist.
NSPortNameServer.hReturns the NSPort object registered under a given name on the local host.
- (NSPort *)portForName:(NSString *)portName host:(NSString *)hostName
The port name.
The host name. Because NSMessagePortNameServer is a local-only server, hostName must be the empty string or nil.
The NSPort object registered under a given name on the local host. Returns nil if a port named portName does not exist.
NSPortNameServer.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-02-23)