testIPV4Decode() — netty Function Reference
Architecture documentation for the testIPV4Decode() function in HAProxyMessageDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 79dbf7d7_f5e9_1b1d_97d2_eec7073d8bf6["testIPV4Decode()"] 88909aff_3546_2e28_19d9_812a1929ee17["HAProxyMessageDecoderTest"] 79dbf7d7_f5e9_1b1d_97d2_eec7073d8bf6 -->|defined in| 88909aff_3546_2e28_19d9_812a1929ee17 style 79dbf7d7_f5e9_1b1d_97d2_eec7073d8bf6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-haproxy/src/test/java/io/netty/handler/codec/haproxy/HAProxyMessageDecoderTest.java lines 54–73
@Test
public void testIPV4Decode() {
int startChannels = ch.pipeline().names().size();
String header = "PROXY TCP4 192.168.0.1 192.168.0.11 56324 443\r\n";
ch.writeInbound(copiedBuffer(header, CharsetUtil.US_ASCII));
Object msgObj = ch.readInbound();
assertEquals(startChannels - 1, ch.pipeline().names().size());
assertThat(msgObj).isInstanceOf(HAProxyMessage.class);
HAProxyMessage msg = (HAProxyMessage) msgObj;
assertEquals(HAProxyProtocolVersion.V1, msg.protocolVersion());
assertEquals(HAProxyCommand.PROXY, msg.command());
assertEquals(HAProxyProxiedProtocol.TCP4, msg.proxiedProtocol());
assertEquals("192.168.0.1", msg.sourceAddress());
assertEquals("192.168.0.11", msg.destinationAddress());
assertEquals(56324, msg.sourcePort());
assertEquals(443, msg.destinationPort());
assertNull(ch.readInbound());
assertFalse(ch.finish());
assertTrue(msg.release());
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does testIPV4Decode() do?
testIPV4Decode() is a function in the netty codebase, defined in codec-haproxy/src/test/java/io/netty/handler/codec/haproxy/HAProxyMessageDecoderTest.java.
Where is testIPV4Decode() defined?
testIPV4Decode() is defined in codec-haproxy/src/test/java/io/netty/handler/codec/haproxy/HAProxyMessageDecoderTest.java at line 54.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free