Click or drag to resize

IncomingMessageManagerT Class

Manages incoming messages received on a connection.
Inheritance Hierarchy
SystemObject
  Demo3D.NetIncomingMessageManagerT
    Demo3D.NetIncomingPacketManager

Namespace:  Demo3D.Net
Assembly:  Demo3D.IO (in Demo3D.IO.dll) Version: 11.0.0.7658
Syntax
C#
public abstract class IncomingMessageManager<T> : IDisposable
where T : class, IDisposable

Type Parameters

T
An appropriate packet reader for reading data from the connection.

The IncomingMessageManagerT type exposes the following members.

Constructors
Properties
  NameDescription
Protected propertySocket
The connection being managed by this class.
Top
Methods
  NameDescription
Public methodDispose
Stops the message reader.
Public methodExpect
Sets up a handler for incoming requests.
Protected methodReadMessage
Reads the next message from the protocol stream. The message returned will be Dispose'd after it's handled.
Protected methodReadMessageAsync
Reads the next message from the protocol stream. The message returned will be Dispose'd after it's handled.
Public methodStart
Start reading messages from the connection.
Public methodStop
Stop reading messages from the connection.
Public methodStopExpecting
Removes a handler for incoming request.
Public methodTransaction
Sends a (pre-prepared) request and (optionally) waits for a response (synchronously or asynchronously).
Public methodTransactionAsync
Sends a (pre-prepared) request and (optionally) waits for a response (synchronously or asynchronously).
Top
Remarks

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.

See Also