| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/Foundation.framework |
| Availability | Available in Mac OS X v10.0 and later. |
| Declared in | Foundation/NSPort.h |
| Companion guide |
NSMessagePort is a subclass of NSPort that can be used as an endpoint for distributed object connections (or raw messaging). NSMessagePort allows for local (on the same machine) communication only. A companion class, NSSocketPort, allows for both local and remote communication, but may be more expensive than NSMessagePort for the local case.
NSMessagePort defines no additional methods over those already defined by NSPort.
Note: NSMessagePort conforms to the NSCoding protocol, but only supports coding by an NSPortCoder object. NSPort and its subclasses do not support archiving.
Important: Avoid NSMessagePort. There's little reason to use NSMessagePort rather than NSMachPort or NSSocketPort. There's no particular performance or functionality advantage. It is recommended avoiding its use.
NSMessagePort may be deprecated in the Mac OS X v 10.6 or later.
Last updated: 2009-08-20