Home / Function/ testAuthRequestDecoderPartialSend() — netty Function Reference

testAuthRequestDecoderPartialSend() — netty Function Reference

Architecture documentation for the testAuthRequestDecoderPartialSend() function in SocksAuthRequestDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  5f983d51_6aa4_28f1_6f95_cdae834be7ab["testAuthRequestDecoderPartialSend()"]
  d73ea5d3_bd98_0ebe_c074_f8db2a668b15["SocksAuthRequestDecoderTest"]
  5f983d51_6aa4_28f1_6f95_cdae834be7ab -->|defined in| d73ea5d3_bd98_0ebe_c074_f8db2a668b15
  style 5f983d51_6aa4_28f1_6f95_cdae834be7ab fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-socks/src/test/java/io/netty/handler/codec/socks/SocksAuthRequestDecoderTest.java lines 44–72

    @Test
    public void testAuthRequestDecoderPartialSend() {
        EmbeddedChannel ch = new EmbeddedChannel(new SocksAuthRequestDecoder());
        ByteBuf byteBuf = Unpooled.buffer(16);

        // Send username and password size
        byteBuf.writeByte(SocksSubnegotiationVersion.AUTH_PASSWORD.byteValue());
        byteBuf.writeByte(username.length());
        byteBuf.writeBytes(username.getBytes());
        byteBuf.writeByte(password.length());
        ch.writeInbound(byteBuf);

        // Check that channel is empty
        assertNull(ch.readInbound());

        // Send password
        ByteBuf byteBuf2 = Unpooled.buffer();
        byteBuf2.writeBytes(password.getBytes());
        ch.writeInbound(byteBuf2);

        // Read message from channel
        SocksAuthRequest msg = ch.readInbound();

        // Check message
        assertEquals(username, msg.username());
        assertEquals(password, msg.password());

        assertFalse(ch.finishAndReleaseAll());
    }

Domain

Subdomains

Frequently Asked Questions

What does testAuthRequestDecoderPartialSend() do?
testAuthRequestDecoderPartialSend() is a function in the netty codebase, defined in codec-socks/src/test/java/io/netty/handler/codec/socks/SocksAuthRequestDecoderTest.java.
Where is testAuthRequestDecoderPartialSend() defined?
testAuthRequestDecoderPartialSend() is defined in codec-socks/src/test/java/io/netty/handler/codec/socks/SocksAuthRequestDecoderTest.java at line 44.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free