testPacketLength() — netty Function Reference
Architecture documentation for the testPacketLength() function in SslUtilsTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 7678f0a6_ca17_7e40_9f9d_1ac88c7d206c["testPacketLength()"] 48820ee9_de8c_874d_12df_29f6fb10052e["SslUtilsTest"] 7678f0a6_ca17_7e40_9f9d_1ac88c7d206c -->|defined in| 48820ee9_de8c_874d_12df_29f6fb10052e style 7678f0a6_ca17_7e40_9f9d_1ac88c7d206c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/test/java/io/netty/handler/ssl/SslUtilsTest.java lines 44–68
@SuppressWarnings("deprecation")
@Test
public void testPacketLength() throws SSLException, NoSuchAlgorithmException {
SSLEngine engineLE = newEngine();
SSLEngine engineBE = newEngine();
ByteBuffer empty = ByteBuffer.allocate(0);
ByteBuffer cTOsLE = ByteBuffer.allocate(17 * 1024).order(ByteOrder.LITTLE_ENDIAN);
ByteBuffer cTOsBE = ByteBuffer.allocate(17 * 1024);
assertTrue(engineLE.wrap(empty, cTOsLE).bytesProduced() > 0);
cTOsLE.flip();
assertTrue(engineBE.wrap(empty, cTOsBE).bytesProduced() > 0);
cTOsBE.flip();
ByteBuf bufferLE = Unpooled.buffer().order(ByteOrder.LITTLE_ENDIAN).writeBytes(cTOsLE);
ByteBuf bufferBE = Unpooled.buffer().writeBytes(cTOsBE);
// Test that the packet-length for BE and LE is the same
assertEquals(getEncryptedPacketLength(bufferBE, 0, true),
getEncryptedPacketLength(bufferLE, 0, true));
assertEquals(getEncryptedPacketLength(new ByteBuffer[] { bufferBE.nioBuffer() }, 0),
getEncryptedPacketLength(new ByteBuffer[] { bufferLE.nioBuffer().order(ByteOrder.LITTLE_ENDIAN) }, 0));
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testPacketLength() do?
testPacketLength() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/SslUtilsTest.java.
Where is testPacketLength() defined?
testPacketLength() is defined in handler/src/test/java/io/netty/handler/ssl/SslUtilsTest.java at line 44.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free