public interface IDatagramReader
Modifier and Type | Method and Description |
---|---|
void |
read(byte[] datagram)
Called when a new datagram was received from the remote end.
|
void |
read(ByteBuffer datagram)
Called when a new datagram was received from the remote end.
|
void |
read(SocketAddress remoteAddress,
byte[] datagram)
Called when a new datagram was received from a remote end that is
identified by the given remote address.
|
void |
read(SocketAddress remoteAddress,
ByteBuffer datagram)
Called when a new datagram was received from a remote end that is identified
by the given remote address.
|
void read(byte[] datagram)
The passed array can be safely stored or modified by this method as it will not be used by the caller.
datagram
- the datagram received from the remote end.void read(ByteBuffer datagram)
The passed buffer can be safely stored or modified by this method as it will not be used by the caller.
datagram
- the datagram received from the remote end.void read(SocketAddress remoteAddress, byte[] datagram)
The passed array can be safely stored or modified by this method as it will not be used by the caller.
remoteAddress
- address of the remote end.datagram
- the datagram received from the remote end.void read(SocketAddress remoteAddress, ByteBuffer datagram)
In contrary to the read
method with a byte array argument, this
method is only called when the associated session is configured to optimize
data copying and uses an allocator supporting the releasing of no longer used
buffers.
The passed buffer can be safely stored or modified by this method as it will not be used by the caller.
remoteAddress
- address of the remote end.datagram
- the datagram received from the remote end.Copyright © 2017–2021 SNF4J.ORG. All rights reserved.