NSMachBootstrapServer Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/Foundation.framework |
| Availability | Available in OS X v10.0 and later. |
| Companion guide | |
| Declared in | NSPortNameServer.h |
Overview
This port name server takes and returns instances of NSMachPort.
Port removal functionality is not supported in NSMachBootstrapServer; if you want to cancel a service, you have to destroy the port (invalidate the NSMachPort given to registerPort:name:).
Class Methods
sharedInstance
Returns the shared instance of the bootstrap server.
Return Value
The shared instance of NSMachBootstrapServer with which you register and look up NSMachPort objects.
Availability
- Available in OS X v10.0 and later.
Declared In
NSPortNameServer.hInstance Methods
portForName:
Looks up and returns the port registered under the specified name on the local host.
Parameters
- portName
The name of the desired port.
Return Value
The port associated with portName on the local host. Returns nil if no such port exists.
Availability
- Available in OS X v10.0 and later.
See Also
Declared In
NSPortNameServer.hportForName:host:
Looks up and returns the port registered under the specified name.
Parameters
- portName
The name of the desired port.
- hostName
Because
NSMachBootstrapServeris a local-only server; hostName must be the empty string ornil.
Return Value
The port associated with portName on the local host. Returns nil if no such port exists.
Availability
- Available in OS X v10.0 and later.
Declared In
NSPortNameServer.hregisterPort:name:
Registers a port with a specified name.
Parameters
- port
The port object to register with the bootstrap server.
- portName
The name to associate with port.
Return Value
YES if the registration succeeded, NO otherwise.
Special Considerations
Once registered, a port cannot be unregistered; instead, you need to invalidate the port.
Availability
- Available in OS X v10.0 and later.
Declared In
NSPortNameServer.hservicePortWithName:
Looks up and returns the port for the vended service that is registered under the specified name.
Parameters
- name
The name of the vended service.
Return Value
The port associated with name. Returns nil if no such port exists.
Availability
- Available in OS X v10.5 and later.
Declared In
NSPortNameServer.h© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-01-22)