Top Description Inners Fields Constructors Methods
io.netty.contrib.handler.codec.socks

public Class SocksCmdRequestDecoder

extends ByteToMessageDecoder
Class Inheritance
Imports
io.netty5.buffer.Buffer, io.netty5.channel.ChannelHandlerContext, io.netty5.handler.codec.ByteToMessageDecoder, java.nio.charset.StandardCharsets, io.netty5.util.NetUtil

Decodes Buffers into SocksCmdRequest. Before returning SocksRequest decoder removes itself from pipeline.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum

Field Summary

Modifier and TypeField and Description
private SocksAddressType
private SocksCmdType
private SocksCmdRequestDecoder.State
Inherited from io.netty5.handler.codec.ByteToMessageDecoder:
COMPOSITE_CUMULATORMERGE_CUMULATOR

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
decode(ChannelHandlerContext ctx, Buffer
the Buffer from which to read data
buffer
)

Implements abstract io.netty5.handler.codec.ByteToMessageDecoder.decode.

Decode the from one Buffer to another.
Inherited from io.netty5.handler.codec.ByteToMessageDecoder:
actualReadableByteschannelInactivechannelReadchannelReadCompletechannelShutdowndecodeLastdiscardSomeReadByteshandlerAddedhandlerAdded0handlerRemovedhandlerRemoved0internalBufferisSharableisSingleDecodesetSingleDecode

Field Detail

addressTypeback to summary
private SocksAddressType addressType
cmdTypeback to summary
private SocksCmdType cmdType
stateback to summary
private SocksCmdRequestDecoder.State state

Constructor Detail

SocksCmdRequestDecoderback to summary
public SocksCmdRequestDecoder()

Method Detail

decodeback to summary
protected void decode(ChannelHandlerContext ctx, Buffer buffer) throws Exception

Implements abstract io.netty5.handler.codec.ByteToMessageDecoder.decode.

Doc from io.netty5.handler.codec.ByteToMessageDecoder.decode.

Decode the from one Buffer to another. This method will be called till either the input Buffer has nothing to read when return from this method or till nothing was read from the input Buffer.

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext which this ByteToMessageDecoder belongs to

buffer:Buffer

the Buffer from which to read data

Annotations
@Override
Exceptions
Exception:
is thrown if an error occurs
io.netty.contrib.handler.codec.socks back to summary

private final Enum SocksCmdRequestDecoder.State

extends Enum<SocksCmdRequestDecoder.State>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final SocksCmdRequestDecoder.State
public static final SocksCmdRequestDecoder.State
public static final SocksCmdRequestDecoder.State

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static SocksCmdRequestDecoder.State
public static SocksCmdRequestDecoder.State[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CHECK_PROTOCOL_VERSIONback to summary
public static final SocksCmdRequestDecoder.State CHECK_PROTOCOL_VERSION
READ_CMD_ADDRESSback to summary
public static final SocksCmdRequestDecoder.State READ_CMD_ADDRESS
READ_CMD_HEADERback to summary
public static final SocksCmdRequestDecoder.State READ_CMD_HEADER

Constructor Detail

Stateback to summary
private State()

Method Detail

valueOfback to summary
public static SocksCmdRequestDecoder.State valueOf(String name)
valuesback to summary
public static SocksCmdRequestDecoder.State[] values()