IncomingMessageManagerT Class |
Namespace: Demo3D.Net
public abstract class IncomingMessageManager<T> : IDisposable where T : class, IDisposable
The IncomingMessageManagerT type exposes the following members.
| Name | Description | |
|---|---|---|
| IncomingMessageManagerT |
Manages and dispatches incoming messages. Starts a thread reading messages from the socket.
|
| Name | Description | |
|---|---|---|
| Dispose |
Stops the message reader.
| |
| Expect |
Sets up a handler for incoming requests.
| |
| ReadMessage |
Reads the next message from the protocol stream.
The message returned will be Dispose'd after it's handled.
| |
| ReadMessageAsync |
Reads the next message from the protocol stream.
The message returned will be Dispose'd after it's handled.
| |
| Start |
Start reading messages from the connection.
| |
| Stop |
Stop reading messages from the connection.
| |
| StopExpecting |
Removes a handler for incoming request.
| |
| Transaction |
Sends a (pre-prepared) request and (optionally) waits for a response (synchronously or asynchronously).
| |
| TransactionAsync |
Sends a (pre-prepared) request and (optionally) waits for a response (synchronously or asynchronously).
|
Takes control of reading data from the socket. Matches incoming messages with a MessageHandler that's expecting the message to arrive.
The message manager can be used with predefined MessageHandlers to accept incoming messages and route them to the appropriate handler. Or it can be used to manage a request/response style transactions, sending the request and waiting for the response.
It can be configured to send transactions synchronously, allow 'respond-behind', or allow overlapping transactions. See IncomingMessageManagerProperties for more details.