Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

IPC::MsgServer Class Reference

This class uses TwoWayMsg for the server side of a single server/multiple client scenario. More...

#include <ipcplus.h>

Inheritance diagram for IPC::MsgServer::

IPC::TwoWayMsg List of all members.

Public Methods

 MsgServer (const unsigned int key0)
 Constructor.

virtual ~MsgServer ()
 Destructor.

virtual bool xmit (const void *data, const size_t size)
 Transmit a reply to the current client. More...

virtual bool recv (void *mData, size_t &mSize)
 Receive a request. More...


Private Attributes

int nextClient
 Used for the automatic client identification.


Detailed Description

This class uses TwoWayMsg for the server side of a single server/multiple client scenario.


Member Function Documentation

bool IPC::MsgServer::recv void *    mData,
size_t &    mSize
[virtual]
 

Receive a request.

This methode automatically handles client registration in conjunction with the MsgClient class below. Clients register with the server to obtain a unique identification (address) which is handled transparantly by this method. The server MUST call xmit() before calling recv() again or the client will hang.

Parameters:
mData  Must be a pointer to a buffer of the correct size.
mSize  Will hold the number of bytes received.
Returns:
False if this didn't work.

virtual bool IPC::MsgServer::xmit const void *    data,
const size_t    size
[inline, virtual]
 

Transmit a reply to the current client.

The current client is determined by the recv() method below.

Parameters:
data  The bytes to send.
size  The number of bytes to send.
Returns:
False if this didn't work.


The documentation for this class was generated from the following files:
Generated on Wed May 15 09:33:33 2002 for IPCPlus by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001