Home / Function/ testDecoder() — netty Function Reference

testDecoder() — netty Function Reference

Architecture documentation for the testDecoder() function in CodecHaProxyTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  82634bc6_09a5_bb2d_98eb_08c759bfaa64["testDecoder()"]
  314e5a9e_f4d3_fb52_8aa1_97a6c61cc5ea["CodecHaProxyTest"]
  82634bc6_09a5_bb2d_98eb_08c759bfaa64 -->|defined in| 314e5a9e_f4d3_fb52_8aa1_97a6c61cc5ea
  style 82634bc6_09a5_bb2d_98eb_08c759bfaa64 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

testsuite-jpms/src/test/java/io/netty/testsuite_jpms/test/CodecHaProxyTest.java lines 33–45

    @Test
    public void testDecoder() {
        EmbeddedChannel channel = new EmbeddedChannel(HAProxyMessageEncoder.INSTANCE);
        HAProxyMessage message = new HAProxyMessage(
                HAProxyProtocolVersion.V1, HAProxyCommand.PROXY, HAProxyProxiedProtocol.TCP4,
                "192.168.0.1", "192.168.0.11", 56324, 443);
        assertTrue(channel.writeOutbound(message));
        ByteBuf byteBuf = channel.readOutbound();
        assertEquals("PROXY TCP4 192.168.0.1 192.168.0.11 56324 443\r\n",
                byteBuf.toString(CharsetUtil.US_ASCII));
        byteBuf.release();
        assertFalse(channel.finish());
    }

Domain

Subdomains

Frequently Asked Questions

What does testDecoder() do?
testDecoder() is a function in the netty codebase, defined in testsuite-jpms/src/test/java/io/netty/testsuite_jpms/test/CodecHaProxyTest.java.
Where is testDecoder() defined?
testDecoder() is defined in testsuite-jpms/src/test/java/io/netty/testsuite_jpms/test/CodecHaProxyTest.java at line 33.

Analyze Your Own Codebase

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

Try Supermodel Free