decode() — netty Function Reference
Architecture documentation for the decode() function in Socks5PasswordAuthResponseDecoder.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD a7a929a6_3a60_1d5b_e630_f82adb27c24a["decode()"] 687ba40c_a71c_d4c6_22c5_eee31c2f27b5["Socks5PasswordAuthResponseDecoder"] a7a929a6_3a60_1d5b_e630_f82adb27c24a -->|defined in| 687ba40c_a71c_d4c6_22c5_eee31c2f27b5 612e78d9_7c69_f5ec_0a3e_c669e9ccd6ee["fail()"] a7a929a6_3a60_1d5b_e630_f82adb27c24a -->|calls| 612e78d9_7c69_f5ec_0a3e_c669e9ccd6ee style a7a929a6_3a60_1d5b_e630_f82adb27c24a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-socks/src/main/java/io/netty/handler/codec/socksx/v5/Socks5PasswordAuthResponseDecoder.java lines 48–76
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
try {
switch (state()) {
case INIT: {
final byte version = in.readByte();
if (version != 1) {
throw new DecoderException("unsupported subnegotiation version: " + version + " (expected: 1)");
}
out.add(new DefaultSocks5PasswordAuthResponse(Socks5PasswordAuthStatus.valueOf(in.readByte())));
checkpoint(State.SUCCESS);
}
case SUCCESS: {
int readableBytes = actualReadableBytes();
if (readableBytes > 0) {
out.add(in.readRetainedSlice(readableBytes));
}
break;
}
case FAILURE: {
in.skipBytes(actualReadableBytes());
break;
}
}
} catch (Exception e) {
fail(out, e);
}
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does decode() do?
decode() is a function in the netty codebase, defined in codec-socks/src/main/java/io/netty/handler/codec/socksx/v5/Socks5PasswordAuthResponseDecoder.java.
Where is decode() defined?
decode() is defined in codec-socks/src/main/java/io/netty/handler/codec/socksx/v5/Socks5PasswordAuthResponseDecoder.java at line 48.
What does decode() call?
decode() calls 1 function(s): fail.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free