ezEngine Release 26.9
Loading...
Searching...
No Matches
ezProcessCommunicationChannel Class Reference
Inheritance diagram for ezProcessCommunicationChannel:

Classes

struct  Event
 

Public Types

using WaitForMessageCallback = ezDelegate< bool(ezProcessMessage *)>
 

Public Member Functions

bool SendMessage (ezProcessMessage *pMessage)
 
ezResult WaitForMessage (const ezRTTI *pMessageType, ezTime timeout, WaitForMessageCallback *pMessageCallack=nullptr)
 
ezResult WaitForConnection (ezTime timeout)
 
bool IsConnected () const
 
bool ProcessMessages ()
 Returns true if any message was processed.
 
void WaitForMessages (ezTime timeout=ezTime::MakeZero())
 Blocks until a message arrives.
 

Public Attributes

ezEvent< const Event & > m_Events
 
ezEvent< const ezIpcChannelEvent &, ezMutexm_IpcChannelEvents
 

Protected Member Functions

void OnIpcProtocolEvent (const ezIpcProcessMessageProtocol::Event &msg)
 
void OnIpcChannelEvent (const ezIpcChannelEvent &msg)
 
ezResult CreateAndConnectChannel (ezInternal::NewInstance< ezIpcChannel > &&channel)
 
void DestroyChannel ()
 

Protected Attributes

ezUniquePtr< ezIpcProcessMessageProtocolm_pProtocol
 
ezUniquePtr< ezIpcChannelm_pChannel
 
const ezRTTIm_pFirstAllowedMessageType = nullptr
 

Member Typedef Documentation

◆ WaitForMessageCallback

/brief Callback for 'wait for...' functions. If true is returned, the message is accepted to match the wait criteria and the waiting ends. If false is returned the wait for the message continues.

Member Function Documentation

◆ WaitForMessages()

void ezProcessCommunicationChannel::WaitForMessages ( ezTime  timeout = ezTime::MakeZero())

Blocks until a message arrives.

Parameters
timeoutZero blocks indefinitely. Pass a short one when the caller has other work that a message is not going to wake it up for.

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