@FunctionalInterface
public interface SegmentedDatagramPacketAllocator
Modifier and Type | Field and Description |
---|---|
static SegmentedDatagramPacketAllocator |
NONE
SegmentedDatagramPacketAllocator which should be used if no UDP_SEGMENT is supported and used. |
Modifier and Type | Method and Description |
---|---|
default int |
maxNumSegments()
The maximum number of segments to use per packet.
|
io.netty.channel.socket.DatagramPacket |
newPacket(io.netty.buffer.ByteBuf buffer,
int segmentSize,
java.net.InetSocketAddress remoteAddress)
Return a new segmented
DatagramPacket . |
static final SegmentedDatagramPacketAllocator NONE
SegmentedDatagramPacketAllocator
which should be used if no UDP_SEGMENT is supported and used.default int maxNumSegments()
10
but this may be overriden by
the implementation of the interface.io.netty.channel.socket.DatagramPacket newPacket(io.netty.buffer.ByteBuf buffer, int segmentSize, java.net.InetSocketAddress remoteAddress)
DatagramPacket
.buffer
- the ByteBuf
that is used as content.segmentSize
- the size of each segment.remoteAddress
- the remote address to send to.Copyright © 2020-2021 The Netty Project. All Rights Reserved.