testV2InvalidProtocol() — netty Function Reference
Architecture documentation for the testV2InvalidProtocol() function in HAProxyMessageDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 0cdb477b_14a9_15a3_fc81_12d9a110a6b0["testV2InvalidProtocol()"] 88909aff_3546_2e28_19d9_812a1929ee17["HAProxyMessageDecoderTest"] 0cdb477b_14a9_15a3_fc81_12d9a110a6b0 -->|defined in| 88909aff_3546_2e28_19d9_812a1929ee17 style 0cdb477b_14a9_15a3_fc81_12d9a110a6b0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-haproxy/src/test/java/io/netty/handler/codec/haproxy/HAProxyMessageDecoderTest.java lines 900–944
@Test
public void testV2InvalidProtocol() {
final byte[] header = new byte[28];
header[0] = 0x0D; // Binary Prefix
header[1] = 0x0A; // -----
header[2] = 0x0D; // -----
header[3] = 0x0A; // -----
header[4] = 0x00; // -----
header[5] = 0x0D; // -----
header[6] = 0x0A; // -----
header[7] = 0x51; // -----
header[8] = 0x55; // -----
header[9] = 0x49; // -----
header[10] = 0x54; // -----
header[11] = 0x0A; // -----
header[12] = 0x21; // v2, cmd=PROXY
header[13] = 0x41; // Bogus transport protocol
header[14] = 0x00; // Remaining Bytes
header[15] = 0x0c; // -----
header[16] = (byte) 0xc0; // Source Address
header[17] = (byte) 0xa8; // -----
header[18] = 0x00; // -----
header[19] = 0x01; // -----
header[20] = (byte) 0xc0; // Destination Address
header[21] = (byte) 0xa8; // -----
header[22] = 0x00; // -----
header[23] = 0x0b; // -----
header[24] = (byte) 0xdc; // Source Port
header[25] = 0x04; // -----
header[26] = 0x01; // Destination Port
header[27] = (byte) 0xbb; // -----
assertThrows(HAProxyProtocolException.class, new Executable() {
@Override
public void execute() {
ch.writeInbound(copiedBuffer(header));
}
});
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does testV2InvalidProtocol() do?
testV2InvalidProtocol() is a function in the netty codebase, defined in codec-haproxy/src/test/java/io/netty/handler/codec/haproxy/HAProxyMessageDecoderTest.java.
Where is testV2InvalidProtocol() defined?
testV2InvalidProtocol() is defined in codec-haproxy/src/test/java/io/netty/handler/codec/haproxy/HAProxyMessageDecoderTest.java at line 900.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free