Up
Authors
- Richard Frith-Macdonald (
richard@brainstorm.co.uk
)
-
Version: 37003
Date: 2013-08-22 09:44:54 -0600 (Thu, 22 Aug 2013)
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.
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.
Up