![]() |
XII Release 0.1.0
|
A protocol around xiiIpcChannel to send reflected messages instead of byte array messages between client and server. More...
#include <IpcProcessMessageProtocol.h>
Public Member Functions | |
xiiIpcProcessMessageProtocol (xiiIpcChannel *pChannel) | |
bool | Send (xiiProcessMessage *pMsg) |
Sends a message. pMsg can be destroyed after the call. | |
bool | ProcessMessages () |
Processes all pending messages by broadcasting m_MessageEvent. Not re-entrant. | |
xiiResult | WaitForMessages (xiiTime timeout=xiiTime::MakeZero()) |
Block and wait for new messages and call ProcessMessages. | |
Public Attributes | |
xiiEvent< const xiiProcessMessage * > | m_MessageEvent |
Will be sent from thread calling ProcessMessages or WaitForMessages. | |
A protocol around xiiIpcChannel to send reflected messages instead of byte array messages between client and server.
This wrapper class hooks into an existing xiiIpcChannel. The xiiIpcChannel is still responsible for all connection logic. This class merely provides a high-level messaging protocol via reflected messages derived from xiiProcessMessage. Note that if this class is used, xiiIpcChannel::Send must not be called manually anymore, only use xiiIpcProcessMessageProtocol::Send. Received messages are stored in a queue and must be flushed via calling ProcessMessages or WaitForMessages.