Socks4ClientDecoderTest Class — netty Architecture
Architecture documentation for the Socks4ClientDecoderTest class in Socks4ClientDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 59009bc2_846d_8eb2_7ef3_75dc2b38053b["Socks4ClientDecoderTest"] dde6d89d_c548_3b99_b951_6070243bd152["Socks4ClientDecoderTest.java"] 59009bc2_846d_8eb2_7ef3_75dc2b38053b -->|defined in| dde6d89d_c548_3b99_b951_6070243bd152 d5ecd4fc_8e21_7fb4_38a5_d37ff44c20c9["test()"] 59009bc2_846d_8eb2_7ef3_75dc2b38053b -->|method| d5ecd4fc_8e21_7fb4_38a5_d37ff44c20c9 34c72cad_efd8_58be_1291_1d6d90f2d001["testSocksCmdResponseDecoder()"] 59009bc2_846d_8eb2_7ef3_75dc2b38053b -->|method| 34c72cad_efd8_58be_1291_1d6d90f2d001
Relationship Graph
Source Code
codec-socks/src/test/java/io/netty/handler/codec/socksx/v4/Socks4ClientDecoderTest.java lines 26–54
public class Socks4ClientDecoderTest {
private static final Logger logger = LoggerFactory.getLogger(Socks4ClientDecoderTest.class);
private static void test(Socks4CommandStatus cmdStatus, String dstAddr, int dstPort) {
logger.debug("Testing cmdStatus: " + cmdStatus);
Socks4CommandResponse msg = new DefaultSocks4CommandResponse(cmdStatus, dstAddr, dstPort);
EmbeddedChannel embedder = new EmbeddedChannel(new Socks4ClientDecoder());
Socks4CommonTestUtils.writeMessageIntoEmbedder(embedder, msg);
msg = embedder.readInbound();
assertEquals(msg.status(), cmdStatus);
if (dstAddr != null) {
assertEquals(msg.dstAddr(), dstAddr);
}
assertEquals(msg.dstPort(), dstPort);
assertNull(embedder.readInbound());
}
/**
* Verifies that sent socks messages are decoded correctly.
*/
@Test
public void testSocksCmdResponseDecoder() {
test(Socks4CommandStatus.IDENTD_AUTH_FAILURE, null, 0);
test(Socks4CommandStatus.IDENTD_UNREACHABLE, null, 0);
test(Socks4CommandStatus.REJECTED_OR_FAILED, null, 0);
test(Socks4CommandStatus.SUCCESS, null, 0);
}
}
Source
Frequently Asked Questions
What is the Socks4ClientDecoderTest class?
Socks4ClientDecoderTest is a class in the netty codebase, defined in codec-socks/src/test/java/io/netty/handler/codec/socksx/v4/Socks4ClientDecoderTest.java.
Where is Socks4ClientDecoderTest defined?
Socks4ClientDecoderTest is defined in codec-socks/src/test/java/io/netty/handler/codec/socksx/v4/Socks4ClientDecoderTest.java at line 26.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free