DekGenius.com
[ Team LiB ] Previous Section Next Section

NSPortMessage Mac OS X 10.0

Instances of this class represent low-level interapplication communication meesages. Cocoa's distributed objects system uses this class extensively for communications between applications on the same host machine. Associated with each port messages is a sending NSPort, a receiving NSPort, and an array of message components that may be instances of NSData or NSPort. Instances of this class are initialized using the method initWithSendPort:receivePort:components:. Messages are sent by invoking the method sendBeforeDate:. Finally, the components method is used to retrieve the components of a port message, while sendPort and receivePort are used to retrieve the port message's send and receive port objects. Applications should make use of the high-level Distributed Objects API for interapplication communication, and resort to raw messaging with port messages for exceptional circumstances.

figs/cocn_1377.gif

@interface NSPortMessage : NSObject
 // Initializers
   - (id)initWithSendPort:(NSPort *)sendPort receivePort:(NSPort *)replyPort components:(NSArray *)components;
 // Accessor Methods
   - (void)setMsgid:(unsigned)msgid;
   - (unsigned)msgid;
 // Instance Methods
   - (NSArray *)components;
   - (NSPort *)receivePort;
   - (BOOL)sendBeforeDate:(NSDate *)date;
   - (NSPort *)sendPort;

    [ Team LiB ] Previous Section Next Section