public class Socks5CommandResponseDecoder extends ReplayingDecoder<io.netty.handler.codec.socksx.v5.Socks5CommandResponseDecoder.State>
ByteBuf解码单个Socks5CommandResponse 。
在成功解码时,该解码器会将接收到的数据转发到下一个处理程序,以便其他处理程序可以在稍后移除或替换此解码程序。
解码失败时,该解码器将丢弃接收到的数据,以便其他处理程序稍后关闭连接。
ByteToMessageDecoder.CumulatorChannelHandler.SharableCOMPOSITE_CUMULATOR, MERGE_CUMULATOR| Constructor and Description |
|---|
Socks5CommandResponseDecoder() |
Socks5CommandResponseDecoder(Socks5AddressDecoder addressDecoder) |
| 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, stateactualReadableBytes, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggeredchannelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtensureNotSharable, handlerAdded, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerAddedpublic Socks5CommandResponseDecoder()
public Socks5CommandResponseDecoder(Socks5AddressDecoder addressDecoder)
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.