#include <messaging.h>
Public Attributes | |
void(* | poll )(Connection *connection[], int count, int timeout) |
void(* | send_immediate )(Channel *channel, Message *message) |
int(* | process_messages )(Connection *connection, short limit) |
A Messaging_Controller instance encapsulates those functions which perform an administrative role in message delivery rather than a user-focused role (send, receive, subscribe, etc). These are intended to be used by code which controls message delivery and execution to an application component (i.e. within an Execution instance) rather than from within the application component itself
void(* messaging_controller::poll)(Connection *connection[], int count, int timeout) |
Poll a number of Connections until a message is available.
Given an array of Connections, will block until at least one message in one of the given Connections is deliverable via Controller->process_messages(Connection * connection, short limit)) or the given timeout deadline has been reached. A "-1" timeout means block indefinitely, all other values signify a timeout in milliseconds. A value of "0" implies returning immediately.
connection | Array of Connection instances. | |
count | Number of Connection instances in the given array. | |
timeout | Timeout value in milliseconds. -1 means infinite. |
int(* messaging_controller::process_messages)(Connection *connection, short limit) |
Deliver (execute callback in current thread) all pending messages.
Used in managing the execution of message delivery, typically by an Execution engine and not end users. Thus, use this only if you know what you're doing!
connection | The connection whose pending messages shall be delivered | |
limit | Upper limit placed on number of messages to deliver upon this invocation. A value of 0 or less implies "deliver all pending messages". |
void(* messaging_controller::send_immediate)(Channel *channel, Message *message) |
Send a message for "immediate" consumption, potentially bypassing others in queue.