public class MessageDecoder
extends io.netty.handler.codec.LengthFieldBasedFrameDecoder
| 构造器和说明 |
|---|
MessageDecoder(int maxFrameLength,
int lengthFieldOffset,
int lengthFieldLength,
int lengthAdjustment,
int initialBytesToStrip,
boolean failFast) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected Object |
decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in) |
decode, extractFrame, getUnadjustedFrameLengthactualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggeredchannelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtpublic MessageDecoder(int maxFrameLength,
int lengthFieldOffset,
int lengthFieldLength,
int lengthAdjustment,
int initialBytesToStrip,
boolean failFast)
maxFrameLength - 网络字节序lengthFieldOffset - 长度字段偏移的字节数lengthFieldLength - 数据帧的最大长度lengthAdjustment - 该字段加长度字段等于数据帧的长度initialBytesToStrip - 数据帧中跳过的字节数failFast - 是否长度域超过maxFrameLength抛出TooLongFrameExceptionCopyright © 2019. All rights reserved.