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

public Class SegmentedDatagramPacket

extends DatagramPacket
Class Inheritance
Imports
io.netty.buffer.ByteBuf, io.netty.channel.socket.DatagramPacket, io.netty.util.internal.ObjectUtil, java.net.InetSocketAddress

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(ByteBuf
the ByteBuf which must be continguous.
data
,
int
the segment size.
segmentSize
,
InetSocketAddress
the recipient.
recipient
)

Create a new instance.

public
SegmentedDatagramPacket(ByteBuf
the ByteBuf which must be continguous.
data
,
int
the segment size.
segmentSize
,
InetSocketAddress
the recipient.
recipient
,
InetSocketAddress sender)

Create a new instance.

Method Summary

Modifier and TypeMethod and Description
public SegmentedDatagramPacket
public SegmentedDatagramPacket
public SegmentedDatagramPacket
replace(ByteBuf content)

Overrides io.netty.channel.socket.DatagramPacket.replace.

Implements io.netty.buffer.ByteBufHolder.replace.

Returns a new ByteBufHolder which contains the specified content.
public SegmentedDatagramPacket
public SegmentedDatagramPacket
retain(int increment)

Overrides io.netty.channel.socket.DatagramPacket.retain.

Implements io.netty.buffer.ByteBufHolder.retain, io.netty.channel.AddressedEnvelope.retain.

Increases the reference count by the specified increment.
public SegmentedDatagramPacket
public int

Returns:

size of segments.
segmentSize
()

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

public SegmentedDatagramPacket
touch()

Overrides io.netty.channel.socket.DatagramPacket.touch.

Implements io.netty.buffer.ByteBufHolder.touch, io.netty.channel.AddressedEnvelope.touch.

Records the current access location of this object for debugging purposes.
public SegmentedDatagramPacket
touch(Object hint)

Overrides io.netty.channel.socket.DatagramPacket.touch.

Implements io.netty.buffer.ByteBufHolder.touch, io.netty.channel.AddressedEnvelope.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes.

Field Detail

segmentSizeback to summary
private final int segmentSize

Constructor Detail

SegmentedDatagramPacketback to summary
public SegmentedDatagramPacket(ByteBuf data, int segmentSize, InetSocketAddress recipient)

Create a new instance.

Parameters
data:ByteBuf

the ByteBuf which must be continguous.

segmentSize:int

the segment size.

recipient:InetSocketAddress

the recipient.

SegmentedDatagramPacketback to summary
public SegmentedDatagramPacket(ByteBuf data, int segmentSize, InetSocketAddress recipient, InetSocketAddress sender)

Create a new instance.

Parameters
data:ByteBuf

the ByteBuf which must be continguous.

segmentSize:int

the segment size.

recipient:InetSocketAddress

the recipient.

Method Detail

copyback to summary
public SegmentedDatagramPacket copy()

Overrides io.netty.channel.socket.DatagramPacket.copy.

Implements io.netty.buffer.ByteBufHolder.copy.

Doc from io.netty.buffer.ByteBufHolder.copy.

Creates a deep copy of this ByteBufHolder.

Annotations
@Override
duplicateback to summary
public SegmentedDatagramPacket duplicate()

Overrides io.netty.channel.socket.DatagramPacket.duplicate.

Implements io.netty.buffer.ByteBufHolder.duplicate.

Doc from io.netty.buffer.ByteBufHolder.duplicate.

Duplicates this ByteBufHolder. Be aware that this will not automatically call retain().

Annotations
@Override
replaceback to summary
public SegmentedDatagramPacket replace(ByteBuf content)

Overrides io.netty.channel.socket.DatagramPacket.replace.

Implements io.netty.buffer.ByteBufHolder.replace.

Doc from io.netty.buffer.ByteBufHolder.replace.

Returns a new ByteBufHolder which contains the specified content.

Annotations
@Override
retainback to summary
public SegmentedDatagramPacket retain()

Overrides io.netty.channel.socket.DatagramPacket.retain.

Implements io.netty.buffer.ByteBufHolder.retain, io.netty.channel.AddressedEnvelope.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by 1.

Annotations
@Override
retainback to summary
public SegmentedDatagramPacket retain(int increment)

Overrides io.netty.channel.socket.DatagramPacket.retain.

Implements io.netty.buffer.ByteBufHolder.retain, io.netty.channel.AddressedEnvelope.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by the specified increment.

Annotations
@Override
retainedDuplicateback to summary
public SegmentedDatagramPacket retainedDuplicate()

Overrides io.netty.channel.socket.DatagramPacket.retainedDuplicate.

Implements io.netty.buffer.ByteBufHolder.retainedDuplicate.

Doc from io.netty.buffer.ByteBufHolder.retainedDuplicate.

Duplicates this ByteBufHolder. This method returns a retained duplicate unlike duplicate().

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()

Overrides io.netty.channel.socket.DatagramPacket.touch.

Implements io.netty.buffer.ByteBufHolder.touch, io.netty.channel.AddressedEnvelope.touch.

Doc from io.netty.util.ReferenceCounted.touch.

Records the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector. This method is a shortcut to touch(null).

Annotations
@Override
touchback to summary
public SegmentedDatagramPacket touch(Object hint)

Overrides io.netty.channel.socket.DatagramPacket.touch.

Implements io.netty.buffer.ByteBufHolder.touch, io.netty.channel.AddressedEnvelope.touch.

Doc from io.netty.util.ReferenceCounted.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector.

Annotations
@Override