|
Messenger class Messenger is the main class of MsgConnect. It is used to send and receive messages in the thread. Description 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). Messenger works on per-thread basis. This means that there should be one Messenger per thread and all calls to Messenger should be done within this thread. Create an instance of Messenger class using it's Create method. When you don't need the messenger anymore, delete it (where applicable) using Destroy method. (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.
|
|
