C# Class Griffin.Net.Protocols.MicroMsg.MicroMessageDecoder

Decode messages encoded with MicroMessageEncoder.

As MicroMessageEncoder can out-of-the-box send Stream-drived classes and byte[] arrays this class has to handle that too.

Streams will always be either MemoryStream or FileStream depending of the content-length. Same things goes for messages which are sent as byte[] arrays. They will also be received as streams.

Inheritance: IMessageDecoder
Afficher le fichier Open project: jgauffin/Griffin.Framework Class Usage Examples

Méthodes publiques

Méthode Description
Clear ( ) : void

Reset the decoder so that we can parse a new message

MicroMessageDecoder ( IMessageSerializer serializer ) : System

Initializes a new instance of the MicroMessageDecoder class.

ProcessReadBytes ( ISocketBuffer buffer ) : void

Process bytes that we've received on the socket.

Private Methods

Méthode Description
CopyBytes ( ISocketBuffer e ) : bool
ProcessContent ( ISocketBuffer arg ) : bool
ProcessFixedHeader ( ISocketBuffer e ) : bool
ReadHeaderLength ( ISocketBuffer e ) : bool

Method Details

Clear() public méthode

Reset the decoder so that we can parse a new message
public Clear ( ) : void
Résultat void

MicroMessageDecoder() public méthode

Initializes a new instance of the MicroMessageDecoder class.
serializer
public MicroMessageDecoder ( IMessageSerializer serializer ) : System
serializer IMessageSerializer The serializer used to decode the message that is being transported with MicroMsg.
Résultat System

ProcessReadBytes() public méthode

Process bytes that we've received on the socket.
public ProcessReadBytes ( ISocketBuffer buffer ) : void
buffer ISocketBuffer Buffer to process.
Résultat void