- Inherits from:
- NSObject
- Conforms to:
- NSObject
- (NSObject)
Declared in:
- Foundation/NSPortNameServer.h
NSPortNameServer provides an object-oriented interface to the port registration service used by the distributed objects system. NSConnection objects use it to contact each other and to distribute objects over the network; you should rarely need to interact directly with an NSPortNameServer.
You get an NSPortNameServer by using the systemDefaultPortNameServer class method-never allocate and initialize an instance directly. With the default server object you can register an NSPort under a given name, making it available on the network, and also unregister it so that it can't be looked up (although other applications that have already looked up the NSPort can still use it until it becomes invalid). See the NSPort class specification for more information.
- Getting the server object
- + systemDefaultPortNameServer
- Looking ports up
- - portForName:
- - portForName:onHost:
- Registering ports
- - registerPort:forName:
- - removePortForName:
+ (NSPortNameServer *)systemDefaultPortNameServer
- (NSPort *)portForName:(NSString
*)portName
nil
as
the host name. Returns nil
if no
such NSPort exists.See Also: - portForName:onHost:
- (NSPort *)portForName:(NSString
*)portName
onHost:(NSString *)hostName
sales.anycorp.com
").
Returns nil
if no such NSPort exists.If hostName is nil
or
empty then only the local host is checked for portName.
If hostName is "*" then all hosts
on the local subnet are queried for the requested NSPort-where
there are duplicates an arbitrary host's NSPort is returned. That
host is then used for every subsequent request by the local host.
- (BOOL)registerPort:(NSPort
*)aPort
forName:(NSString *)portName
- (void)removePortForName:(NSString
*)portName