May 2003
Intermediate to advanced
566 pages
27h 29m
English
NSPort — Mac OS X 10.0
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; |
Read now
Unlock full access