C# 클래스 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.

상속: IMessageDecoder
파일 보기 프로젝트 열기: jgauffin/Griffin.Framework 1 사용 예제들

공개 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
CopyBytes ( ISocketBuffer e ) : bool
ProcessContent ( ISocketBuffer arg ) : bool
ProcessFixedHeader ( ISocketBuffer e ) : bool
ReadHeaderLength ( ISocketBuffer e ) : bool

메소드 상세

Clear() 공개 메소드

Reset the decoder so that we can parse a new message
public Clear ( ) : void
리턴 void

MicroMessageDecoder() 공개 메소드

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.
리턴 System

ProcessReadBytes() 공개 메소드

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