Plasma Engine  2.0
Loading...
Searching...
No Matches
plIpcProcessMessageProtocol Class Reference

A protocol around plIpcChannel to send reflected messages instead of byte array messages between client and server. More...

#include <IpcProcessMessageProtocol.h>

Public Member Functions

 plIpcProcessMessageProtocol (plIpcChannel *pChannel)
 
bool Send (plProcessMessage *pMsg)
 Sends a message. pMsg can be destroyed after the call.
 
bool ProcessMessages ()
 Processes all pending messages by broadcasting m_MessageEvent. Not re-entrant.
 
plResult WaitForMessages (plTime timeout=plTime::MakeZero())
 Block and wait for new messages and call ProcessMessages.
 

Public Attributes

plEvent< const plProcessMessage * > m_MessageEvent
 Will be sent from thread calling ProcessMessages or WaitForMessages.
 

Detailed Description

A protocol around plIpcChannel to send reflected messages instead of byte array messages between client and server.

This wrapper class hooks into an existing plIpcChannel. The plIpcChannel is still responsible for all connection logic. This class merely provides a high-level messaging protocol via reflected messages derived from plProcessMessage. Note that if this class is used, plIpcChannel::Send must not be called manually anymore, only use plIpcProcessMessageProtocol::Send. Received messages are stored in a queue and must be flushed via calling ProcessMessages or WaitForMessages.


The documentation for this class was generated from the following files: