public final class DatagramPacket extends DefaultAddressedEnvelope<ByteBuf,InetSocketAddress> implements ByteBufHolder
DatagramChannel to communicate with the remote peer.| Constructor and Description |
|---|
DatagramPacket(ByteBuf data,
InetSocketAddress recipient)
Create a new instance with the specified packet
data and recipient address. |
DatagramPacket(ByteBuf data,
InetSocketAddress recipient,
InetSocketAddress sender)
Create a new instance with the specified packet
data, recipient address, and sender
address. |
| Modifier and Type | Method and Description |
|---|---|
DatagramPacket |
copy()
Create a deep copy of this
ByteBufHolder. |
DatagramPacket |
duplicate()
Duplicate the
ByteBufHolder. |
DatagramPacket |
retain()
Increases the reference count by
1. |
DatagramPacket |
retain(int increment)
Increases the reference count by the specified
increment. |
DatagramPacket |
touch()
Records the current access location of this object for debugging purposes.
|
DatagramPacket |
touch(Object hint)
Records the current access location of this object with an additonal arbitrary information for debugging
purposes.
|
content, recipient, refCnt, release, release, sender, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcontentrefCnt, release, releasepublic DatagramPacket(ByteBuf data, InetSocketAddress recipient)
data and recipient address.public DatagramPacket(ByteBuf data, InetSocketAddress recipient, InetSocketAddress sender)
data, recipient address, and sender
address.public DatagramPacket copy()
ByteBufHolderByteBufHolder.copy in interface ByteBufHolderpublic DatagramPacket duplicate()
ByteBufHolderByteBufHolder. Be aware that this will not automatically call ByteBufHolder.retain().duplicate in interface ByteBufHolderpublic DatagramPacket retain()
ReferenceCounted1.retain in interface ByteBufHolderretain in interface AddressedEnvelope<ByteBuf,InetSocketAddress>retain in interface ReferenceCountedretain in class DefaultAddressedEnvelope<ByteBuf,InetSocketAddress>public DatagramPacket retain(int increment)
ReferenceCountedincrement.retain in interface ByteBufHolderretain in interface AddressedEnvelope<ByteBuf,InetSocketAddress>retain in interface ReferenceCountedretain in class DefaultAddressedEnvelope<ByteBuf,InetSocketAddress>public DatagramPacket touch()
ReferenceCountedResourceLeakDetector. This method is a shortcut to touch(null).touch in interface ByteBufHoldertouch in interface AddressedEnvelope<ByteBuf,InetSocketAddress>touch in interface ReferenceCountedtouch in class DefaultAddressedEnvelope<ByteBuf,InetSocketAddress>public DatagramPacket touch(Object hint)
ReferenceCountedResourceLeakDetector.touch in interface ByteBufHoldertouch in interface AddressedEnvelope<ByteBuf,InetSocketAddress>touch in interface ReferenceCountedtouch in class DefaultAddressedEnvelope<ByteBuf,InetSocketAddress>Copyright © 2008–2016 The Netty Project. All rights reserved.