Up
Authors
- Richard Frith-Macdonald (
richard@brainstorm.co.uk
)
-
Date: 2006-08-09 11:14:30 -0600 (Wed, 09 Aug 2006)
Copyright: (C) 1998,2000 Free Software Foundation, Inc.
- Declared in:
- Foundation/NSPortMessage.h
Availability: OpenStep
The data transported for distributed objects communications is sent over the network encapsulated by NSPortMessage objects, which consist of two NSPort
s (sender and receiver, not sent over the network) and a body consisting of one or more NSData
or NSPort
objects. (Data in the NSData
must be in network byte order.)
See the NSConnection
and NSPortCoder
classes.
Instance Variables
Method summary
- (
NSArray*)
components;
Availability: OpenStep
Returns the message components originally used to constitute this message.
- (id)
initWithMachMessage: (void*)buffer;
Availability: OpenStep
OpenStep compatibility.
- (id)
initWithSendPort: (
NSPort*)aPort
receivePort: (
NSPort*)anotherPort
components: (
NSArray*)items;
Availability: OpenStep
This is a designated initialiser for the class.
Initializes to send message described by
items (which should contain only
NSPort
and/or
NSData
objects, with contents in network byte order) over
aPort. If/when a reply to the message is sent, it will arrive on
anotherPort.
- (unsigned)
msgid;
Availability: OpenStep
Returns ID for message. This is not used by the distributed objects system, but may be used in custom ways by cooperating applications to sort or otherwise organize messages. Set to 0 initially.
- (
NSPort*)
receivePort;
Availability: OpenStep
For an outgoing message, returns the port on which a reply to this message will arrive. For an incoming message, returns the port this message arrived on.
- (BOOL)
sendBeforeDate: (
NSDate*)when;
Availability: OpenStep
Request that the message be sent before when. Will block until either sends it (returns YES
) or when expires (returns NO
). The latter may occur if many messages are queued up (by multiple threads) faster than they can be sent over the network.
- (
NSPort*)
sendPort;
Availability: OpenStep
For an outgoing message, returns the port the receiver will send itself through. For an incoming message, returns the port replies to the receiver should be sent through.
- (void)
setMsgid: (unsigned)anId;
Availability: OpenStep
Sets ID for message. This is not used by the distributed objects system, but may be used in custom ways by cooperating applications to sort or otherwise organize messages.
Instance Variables for NSPortMessage Class
@protected NSMutableArray* _components;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
@protected unsigned int _msgid;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
@protected NSPort* _recv;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
@protected NSPort* _send;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Up