Messenger is the main class of MsgConnect. It is used to send and receive messages in the thread.
Messenger is the core of MsgConnect. It offers a set of methods to send and receive messages. It links queues and transports together, thus creating a solid system. Messenger is built in the way that it can handle as many message queues as you wish (much like messaging system in Windows does).
(optional) Initialize the message using one of the following methods:
Sending a message is done via one of the following methods:
If you've created a Queue object, messages are dispatched via Queue and Handler objects. All you will need is to call DispatchMessages method periodically to let messenger call proper event handlers.
There is another option to receive messages -- via GetMessage and PeekMessage methods. If you use these methods to get the message from the message queue, you will need to call MessageProcessed method when the message is processed, so that messenger can send a result and dispose of message data.