C# 클래스 Helios.Codecs.ByteToMessageDecoder

Used for providing message framing capabilities for inbound data
상속: Helios.Channels.ChannelHandlerAdapter
파일 보기 프로젝트 열기: helios-io/helios

공개 프로퍼티들

프로퍼티 타입 설명
Merge Cumulator

공개 메소드들

메소드 설명
ChannelInactive ( IChannelHandlerContext context ) : void
ChannelRead ( IChannelHandlerContext context, object message ) : void
ChannelReadComplete ( IChannelHandlerContext context ) : void
HandlerRemoved ( IChannelHandlerContext context ) : void
SetCumulator ( Cumulator cumulator ) : void

Set the Cumulator function used by this decoder.

SetDiscardAfterReads ( int discardAfterReads ) : void

Set the number of reads after whcih IByteBuf.DiscardSomeReadBytes are called to free up memory. The default is 16.

SetSingleDecode ( bool singleDecode ) : void

When set to true then only one message is decoded on each IChannelHandler.ChannelRead. Defaults to false for performance reasons.

May be useful if oyu need to do a protocol upgrade and want to make sure nothing is mixed up.

보호된 메소드들

메소드 설명
CallDecode ( IChannelHandlerContext context, IByteBuf input, List output ) : void
Decode ( IChannelHandlerContext context, IByteBuf input, List output ) : void
DecodeLast ( IChannelHandlerContext context, IByteBuf input, List output ) : void

Called one last time when the IChannelHandlerContext goes inactive, which means the IChannelHandler.ChannelInactive was triggered. By default this will jsut call Decode but sub-classes may override this for special cleanup operations.

DiscardSomeReadBytes ( ) : void
HandlerRemovedInternal ( IChannelHandlerContext context ) : void

비공개 메소드들

메소드 설명
ChannelInputClosed ( IChannelHandlerContext context, bool callChannelInactive ) : void
ExpandCumulation ( IByteBufAllocator alloc, IByteBuf cumulation, int readable ) : IByteBuf

Expand the existing cumulative IByteBuf.

FireChannelRead ( IChannelHandlerContext context, List msgs, int numElements ) : void

메소드 상세

CallDecode() 보호된 메소드

protected CallDecode ( IChannelHandlerContext context, IByteBuf input, List output ) : void
context IChannelHandlerContext
input IByteBuf
output List
리턴 void

ChannelInactive() 공개 메소드

public ChannelInactive ( IChannelHandlerContext context ) : void
context IChannelHandlerContext
리턴 void

ChannelRead() 공개 메소드

public ChannelRead ( IChannelHandlerContext context, object message ) : void
context IChannelHandlerContext
message object
리턴 void

ChannelReadComplete() 공개 메소드

public ChannelReadComplete ( IChannelHandlerContext context ) : void
context IChannelHandlerContext
리턴 void

Decode() 보호된 추상적인 메소드

protected abstract Decode ( IChannelHandlerContext context, IByteBuf input, List output ) : void
context IChannelHandlerContext
input IByteBuf
output List
리턴 void

DecodeLast() 보호된 메소드

Called one last time when the IChannelHandlerContext goes inactive, which means the IChannelHandler.ChannelInactive was triggered. By default this will jsut call Decode but sub-classes may override this for special cleanup operations.
protected DecodeLast ( IChannelHandlerContext context, IByteBuf input, List output ) : void
context IChannelHandlerContext
input IByteBuf
output List
리턴 void

DiscardSomeReadBytes() 보호된 메소드

protected DiscardSomeReadBytes ( ) : void
리턴 void

HandlerRemoved() 공개 메소드

public HandlerRemoved ( IChannelHandlerContext context ) : void
context IChannelHandlerContext
리턴 void

HandlerRemovedInternal() 보호된 메소드

protected HandlerRemovedInternal ( IChannelHandlerContext context ) : void
context IChannelHandlerContext
리턴 void

SetCumulator() 공개 메소드

Set the Cumulator function used by this decoder.
public SetCumulator ( Cumulator cumulator ) : void
cumulator Cumulator
리턴 void

SetDiscardAfterReads() 공개 메소드

Set the number of reads after whcih IByteBuf.DiscardSomeReadBytes are called to free up memory. The default is 16.
public SetDiscardAfterReads ( int discardAfterReads ) : void
discardAfterReads int
리턴 void

SetSingleDecode() 공개 메소드

When set to true then only one message is decoded on each IChannelHandler.ChannelRead. Defaults to false for performance reasons.
May be useful if oyu need to do a protocol upgrade and want to make sure nothing is mixed up.
public SetSingleDecode ( bool singleDecode ) : void
singleDecode bool The toggle for single decoding
리턴 void

프로퍼티 상세

Merge 공개적으로 정적으로 프로퍼티

public static Cumulator Merge
리턴 Cumulator