Top Description Fields Constructors Methods
io.netty5.channel.unix

public Class SegmentedDatagramPacket

extends DatagramPacket
Class Inheritance
Imports
io.netty5.buffer.Buffer, io.netty5.channel.socket.DatagramPacket, io.netty5.util.internal.ObjectUtil, java.net.InetSocketAddress, .SocketAddress

Allows to use GSO if the underlying OS supports it. Before using this you should ensure your system support it.

Field Summary

Modifier and TypeField and Description
private final int

Constructor Summary

AccessConstructor and Description
public
SegmentedDatagramPacket(Buffer
The data to send.
message
,
int
The (positive) segment size.
segmentSize
,
SocketAddress
The recipient address.
recipient
,
SocketAddress
The sender address.
sender
)

Create a new segmented datagram packet.

public
SegmentedDatagramPacket(Buffer
The data to send.
message
,
int
The (positive) segment size.
segmentSize
,
InetSocketAddress
The recipient address.
recipient
)

Create a new segmented datagram packet.

Method Summary

Modifier and TypeMethod and Description
public SegmentedDatagramPacket
replace(Buffer
The contents of the returned addressed envelope instance.
content
)

Overrides io.netty5.channel.socket.DatagramPacket.replace.

Create a new addressed envelope instance, that has the same recipient and sender as this one, but the given content.
public int

Returns:

size of segments.
segmentSize
()

Return the size of each segment (the last segment can be smaller).

public SegmentedDatagramPacket
touch(Object
An optional hint about this access and its context. May be null.
hint
)

Overrides io.netty5.channel.socket.DatagramPacket.touch.

Overrides default io.netty5.util.Resource.touch.

Record the current access location for debugging purposes.

Field Detail

segmentSizeback to summary
private final int segmentSize

Constructor Detail

SegmentedDatagramPacketback to summary
public SegmentedDatagramPacket(Buffer message, int segmentSize, SocketAddress recipient, SocketAddress sender)

Create a new segmented datagram packet. The attached message may be sent in multiple segment-sized network packets.

Parameters
message:Buffer

The data to send.

segmentSize:int

The (positive) segment size.

recipient:SocketAddress

The recipient address.

sender:SocketAddress

The sender address.

SegmentedDatagramPacketback to summary
public SegmentedDatagramPacket(Buffer message, int segmentSize, InetSocketAddress recipient)

Create a new segmented datagram packet. The attached message may be sent in multiple segment-sized network packets.

Parameters
message:Buffer

The data to send.

segmentSize:int

The (positive) segment size.

recipient:InetSocketAddress

The recipient address.

Method Detail

replaceback to summary
public SegmentedDatagramPacket replace(Buffer content)

Overrides io.netty5.channel.socket.DatagramPacket.replace.

Doc from io.netty5.channel.BufferAddressedEnvelope.replace.

Create a new addressed envelope instance, that has the same recipient and sender as this one, but the given content.

Parameters
content:Buffer

The contents of the returned addressed envelope instance.

Returns:SegmentedDatagramPacket

An addressed envelope instance that has the same recipient and sender as this one, but the given content.

Annotations
@Override
segmentSizeback to summary
public int segmentSize()

Return the size of each segment (the last segment can be smaller).

Returns:int

size of segments.

touchback to summary
public SegmentedDatagramPacket touch(Object hint)

Overrides io.netty5.channel.socket.DatagramPacket.touch.

Overrides default io.netty5.util.Resource.touch.

Doc from io.netty5.util.Resource.touch.

Record the current access location for debugging purposes. This information may be included if the resource throws a life-cycle related exception, or if it leaks. If this resource has already been closed, then this method has no effect.

Parameters
hint:Object

An optional hint about this access and its context. May be null.

Returns:SegmentedDatagramPacket

This resource instance.

Annotations
@Override