InterViews Reference Manual -- ChiefDeputy
NAME
ChiefDeputy - buffer communication with remote object space
SYNOPSIS
#include <InterViews/chief.h>
DESCRIPTION
A chief deputy mutiplexes communication with a remote object space across a
single connection.
PUBLIC OPERATIONS
ChiefDeputy(Connection*)
Construct a chief deputy that sends messages over the given connection.
ObjectTag Tag()
The tag for a chief deputy corresponds to the remote object space itself, whose
tag is by convention zero.
Connection* GetServer()
Return the connection associated with the remote object space.
void Alloc(void*& dst, ObjectTag, int op, int len)
Allocate a message in the buffer.
int PackString(const char*, void* msg)
int
PackString(const char*, int len, void* msg)
Put a string or substring into a message buffer. The buffer area is assumed to
have already been allocated.
void Msg(ObjectTag, int op)
void
StringMsg(ObjectTag, int op, const char*)
void
IntegerMsg(ObjectTag, int op, int val)
Short-hand for allocating a message and storing fields in the cases where a
message has no parameters, a single string parameter, or a single integer
parameter.
void Sync()
Force all messages to be sent to the remote object space.
int ReadReply(void* reply, int len)
void
GetReply(void* reply, int len)
void GetString(const
char*& str, int len)
Read a reply from the object space, first flushing any messages in the buffer.
ReadReply returns the actual size of the reply from the object space. GetReply
will abort if the size is not the size requested. GetString will first read
the size of a string and then the string itself.
SEE ALSO
ChiefDeputy , ObjectSpace
Next: Color
| Prev: Canvas
| Up: index
| Top: index