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