DatagramPacket() — netty Function Reference
Architecture documentation for the DatagramPacket() function in QuicCodecDispatcherTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 966439e3_9a5a_8edb_4236_f5d989c00dfd["DatagramPacket()"] fadd0a68_af3f_4e94_ce6f_6f6ce1e2f7b1["QuicCodecDispatcherTest"] 966439e3_9a5a_8edb_4236_f5d989c00dfd -->|defined in| fadd0a68_af3f_4e94_ce6f_6f6ce1e2f7b1 style 966439e3_9a5a_8edb_4236_f5d989c00dfd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicCodecDispatcherTest.java lines 99–120
private static DatagramPacket createQuicPacket(int idx, boolean shortHeader, short localConnectionIdLength) {
ByteBuf content = Unpooled.buffer();
byte[] random = new byte[localConnectionIdLength];
ThreadLocalRandom.current().nextBytes(random);
if (shortHeader) {
content.writeByte(0);
int writerIndex = content.writerIndex();
content.writeBytes(random);
content.setShort(writerIndex, (short) idx);
} else {
content.writeByte(1);
content.writeInt(7);
content.writeByte((byte) localConnectionIdLength);
int writerIndex = content.writerIndex();
content.writeBytes(random);
content.setShort(writerIndex, (short) idx);
}
// Add some more data.
content.writeZero(ThreadLocalRandom.current().nextInt(32));
return new DatagramPacket(content, new InetSocketAddress(NetUtil.LOCALHOST, 0));
}
Domain
Subdomains
Source
Frequently Asked Questions
What does DatagramPacket() do?
DatagramPacket() is a function in the netty codebase, defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicCodecDispatcherTest.java.
Where is DatagramPacket() defined?
DatagramPacket() is defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicCodecDispatcherTest.java at line 99.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free