- java.lang.Object
-
- io.netty5.channel.DefaultAddressedEnvelope<io.netty5.buffer.Buffer,A>
-
- io.netty5.channel.BufferAddressedEnvelope<SocketAddress,DatagramPacket>
-
- io.netty5.channel.socket.DatagramPacket
-
- All Implemented Interfaces:
AddressedEnvelope<io.netty5.buffer.Buffer,SocketAddress>,io.netty5.util.Resource<DatagramPacket>,AutoCloseable
public class DatagramPacket extends BufferAddressedEnvelope<SocketAddress,DatagramPacket>
The message container that is used forDatagramChannelto communicate with the remote peer.
-
-
Constructor Summary
Constructors Constructor Description DatagramPacket(io.netty5.buffer.Buffer message, SocketAddress recipient)Create a new instance with the specified packetdataandrecipientaddress.DatagramPacket(io.netty5.buffer.Buffer message, SocketAddress recipient, SocketAddress sender)Create a new instance with the specified packetdata,recipientaddress, andsenderaddress.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DatagramPacketreplace(io.netty5.buffer.Buffer content)Create a new addressed envelope instance, that has the same recipient and sender as this one, but the given content.DatagramPackettouch(Object hint)-
Methods inherited from class io.netty5.channel.BufferAddressedEnvelope
close, isAccessible, send
-
Methods inherited from class io.netty5.channel.DefaultAddressedEnvelope
content, recipient, sender, toString
-
-
-
-
Constructor Detail
-
DatagramPacket
public DatagramPacket(io.netty5.buffer.Buffer message, SocketAddress recipient, SocketAddress sender)Create a new instance with the specified packetdata,recipientaddress, andsenderaddress.
-
DatagramPacket
public DatagramPacket(io.netty5.buffer.Buffer message, SocketAddress recipient)Create a new instance with the specified packetdataandrecipientaddress.
-
-
Method Detail
-
replace
public DatagramPacket replace(io.netty5.buffer.Buffer content)
Description copied from class:BufferAddressedEnvelopeCreate a new addressed envelope instance, that has the same recipient and sender as this one, but the given content.- Specified by:
replacein classBufferAddressedEnvelope<SocketAddress,DatagramPacket>- Parameters:
content- The contents of the returned addressed envelope instance.- Returns:
- An addressed envelope instance that has the same recipient and sender as this one, but the given content.
-
touch
public DatagramPacket touch(Object hint)
-
-