DatagramPacket() — netty Function Reference
Architecture documentation for the DatagramPacket() function in NativeDatagramPacketArray.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 5f5434c6_23b1_61cc_c2e6_624f54d9572d["DatagramPacket()"] 9f6481a1_7f1c_9f54_7a7a_c374e172d810["NativeDatagramPacket"] 5f5434c6_23b1_61cc_c2e6_624f54d9572d -->|defined in| 9f6481a1_7f1c_9f54_7a7a_c374e172d810 style 5f5434c6_23b1_61cc_c2e6_624f54d9572d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport-classes-epoll/src/main/java/io/netty/channel/epoll/NativeDatagramPacketArray.java lines 216–230
DatagramPacket newDatagramPacket(ByteBuf buffer, InetSocketAddress recipient) throws UnknownHostException {
InetSocketAddress sender = newAddress(senderAddr, senderAddrLen, senderPort, senderScopeId, ipv4Bytes);
if (recipientAddrLen != 0) {
recipient = newAddress(recipientAddr, recipientAddrLen, recipientPort, recipientScopeId, ipv4Bytes);
}
// Slice out the buffer with the correct length.
ByteBuf slice = buffer.retainedSlice(buffer.readerIndex(), count);
// UDP_GRO
if (segmentSize > 0) {
return new SegmentedDatagramPacket(slice, segmentSize, recipient, sender);
}
return new DatagramPacket(slice, recipient, sender);
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does DatagramPacket() do?
DatagramPacket() is a function in the netty codebase, defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/NativeDatagramPacketArray.java.
Where is DatagramPacket() defined?
DatagramPacket() is defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/NativeDatagramPacketArray.java at line 216.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free