public final class UdpPacket extends Object
| Modifier and Type | Method and Description |
|---|---|
ByteBuf |
getBuf()
Returns the data buffer to send or which was received
|
InetSocketAddress |
getSocketAddress()
Returns the address to which the packet should be sent or from which it
was received.
|
static UdpPacket |
of(ByteBuf buf,
InetSocketAddress inetSocketAddress)
Creates a new instance of UDP packet
|
void |
recycle()
Recycles data buffer.
|
public static UdpPacket of(ByteBuf buf, InetSocketAddress inetSocketAddress)
buf - the data buffer to send or which was receivedinetSocketAddress - the address to which the packet should be send or from which it
was receivedpublic ByteBuf getBuf()
public InetSocketAddress getSocketAddress()
public void recycle()
Copyright © 2019. All rights reserved.