C# Класс Helios.Codecs.ByteToMessageDecoder

Used for providing message framing capabilities for inbound data
Наследование: Helios.Channels.ChannelHandlerAdapter
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
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