public class Socks5InitialResponseDecoder extends ReplayingDecoder<io.netty.handler.codec.socksx.v5.Socks5InitialResponseDecoder.State>
ByteBuf
解码单个Socks5InitialResponse
。
在成功解码时,该解码器会将接收到的数据转发到下一个处理程序,以便其他处理程序可以在稍后移除或替换此解码程序。
解码失败时,该解码器将丢弃接收到的数据,以便其他处理程序稍后关闭连接。
ByteToMessageDecoder.Cumulator
ChannelHandler.Sharable
COMPOSITE_CUMULATOR, MERGE_CUMULATOR
Constructor and Description |
---|
Socks5InitialResponseDecoder() |
Modifier and Type | Method and Description |
---|---|
protected void |
decode(ChannelHandlerContext ctx, ByteBuf in, java.util.List<java.lang.Object> out)
解码从一个 ByteBuf 到另一个。
|
callDecode, checkpoint, checkpoint, state, state
actualReadableBytes, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggered
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
ensureNotSharable, handlerAdded, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handlerAdded
protected void decode(ChannelHandlerContext ctx, ByteBuf in, java.util.List<java.lang.Object> out) throws java.lang.Exception
ByteToMessageDecoder
decode
在课堂上
ByteToMessageDecoder
ctx
- 此ByteToMessageDecoder
所属的ChannelHandlerContext
in
- 从中读取数据的ByteBuf
out
- 应该添加解码消息的
List
java.lang.Exception
- 发生错误时抛出
Copyright © 2008–2018 The Netty Project. All rights reserved.