Name
NSPort — Mac OS X 10.0
Synopsis
This class is an abstract class that declares the interface to
objects that serve as endpoints for communication between two threads
or tasks. Cocoa’s distributed objects system
implements interprocess communication using subclasses of
NSPort
. The Foundation framework implements three
concrete subclasses of NSPort
:
NSMessagePort
, NSMachPort
, and
NSSocketPort
. NSMessagePort
and
NSMachPort
are used for local communications only,
while NSSocketPort
can be used for either local or
remote communication over a network.
|
@interface NSPort : NSObject <NSCoding, NSCopying>
|
// Convenience Constructors
|
+ (NSPort *)port;
|
// Accessor Methods
|
- (void)setDelegate:(id)anId; |
- (id)delegate;
|
// Class Methods
|
+ (id)allocWithZone:(NSZone *)zone; |
// Instance Methods
|
- (void)addConnection:(NSConnection *)conn toRunLoop:(NSRunLoop *)runLoop forMode:(NSString *)mode; |
- (BOOL)isValid;
|
- (void)invalidate;
|
- (void)removeConnection:(NSConnection *)conn fromRunLoop:(NSRunLoop *)runLoop forMode:(NSString *)mode; |
- (void)removeFromRunLoop:(NSRunLoop *)runLoop forMode:(NSString *)mode; |
- (unsigned)reservedSpaceLength;
|
- (void)scheduleInRunLoop:(NSRunLoop *)runLoop forMode:(NSString *)mode; |
- (BOOL)sendBeforeDate:(NSDate *)limitDate components:(NSMutableArray *)components from:(NSPort *)receivePort reserved:(unsigned)headerSpaceReserved; |
Get Cocoa in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.