SocksAuthResponseDecoder Class — netty Architecture
Architecture documentation for the SocksAuthResponseDecoder class in SocksAuthResponseDecoder.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 4109b9d0_e2a6_6dbe_8941_6bda26ca13c3["SocksAuthResponseDecoder"] e56a568d_5241_3d3c_a2db_1b3a83682892["SocksAuthResponseDecoder.java"] 4109b9d0_e2a6_6dbe_8941_6bda26ca13c3 -->|defined in| e56a568d_5241_3d3c_a2db_1b3a83682892 15dfdf28_0a4b_5959_3c09_44115deb6b2c["SocksAuthResponseDecoder()"] 4109b9d0_e2a6_6dbe_8941_6bda26ca13c3 -->|method| 15dfdf28_0a4b_5959_3c09_44115deb6b2c 9efcf727_01a9_6a8d_f457_6cbe174dbc74["decode()"] 4109b9d0_e2a6_6dbe_8941_6bda26ca13c3 -->|method| 9efcf727_01a9_6a8d_f457_6cbe174dbc74
Relationship Graph
Source Code
codec-socks/src/main/java/io/netty/handler/codec/socks/SocksAuthResponseDecoder.java lines 30–64
public class SocksAuthResponseDecoder extends ReplayingDecoder<State> {
public SocksAuthResponseDecoder() {
super(State.CHECK_PROTOCOL_VERSION);
}
@Override
protected void decode(ChannelHandlerContext channelHandlerContext, ByteBuf byteBuf, List<Object> out)
throws Exception {
switch (state()) {
case CHECK_PROTOCOL_VERSION: {
if (byteBuf.readByte() != SocksSubnegotiationVersion.AUTH_PASSWORD.byteValue()) {
out.add(SocksCommonUtils.UNKNOWN_SOCKS_RESPONSE);
break;
}
checkpoint(State.READ_AUTH_RESPONSE);
}
case READ_AUTH_RESPONSE: {
SocksAuthStatus authStatus = SocksAuthStatus.valueOf(byteBuf.readByte());
out.add(new SocksAuthResponse(authStatus));
break;
}
default: {
throw new Error("Unexpected response decoder state: " + state());
}
}
channelHandlerContext.pipeline().remove(this);
}
@UnstableApi
public enum State {
CHECK_PROTOCOL_VERSION,
READ_AUTH_RESPONSE
}
}
Source
Frequently Asked Questions
What is the SocksAuthResponseDecoder class?
SocksAuthResponseDecoder is a class in the netty codebase, defined in codec-socks/src/main/java/io/netty/handler/codec/socks/SocksAuthResponseDecoder.java.
Where is SocksAuthResponseDecoder defined?
SocksAuthResponseDecoder is defined in codec-socks/src/main/java/io/netty/handler/codec/socks/SocksAuthResponseDecoder.java at line 30.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free