O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSPortNameServer — Mac OS X 10.0

Synopsis

This class is used by the distributed objects system to provide port registration services for NSConnection objects. Instances of NSPortNameServer are obtained using the class method systemDefaultPortNameServer. Ports are registered using the method registerPort:name:, and unregistered with removePortForName:. To locate a port, invoke portForName: or portForName:host:; the former is used to locate ports on the local host, while the latter is used to locate ports over a network.

image with no caption

@interface NSPortNameServer : NSObject
                                  // Class Methods
   + (NSPortNameServer *)systemDefaultPortNameServer;
                                  // Instance Methods
   - (NSPort *)portForName:(NSString *)name;
   - (NSPort *)portForName:(NSString *)name 
                                 host:(NSString *)host;
   - (BOOL)registerPort:(NSPort *)port 
                                 name:(NSString *)name;
   - (BOOL)removePortForName:(NSString *)name;

Subclasses

NSMachBootstrapServer, NSMessagePortNameServer, NSSocketPortNameServer

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required