public interface UdpClient
Modifier and Type | Method and Description |
---|---|
void |
close()
Close socket.
|
int |
getSocketBufferSize()
Get UDP socket buffer size.
|
void |
joinMulticastGroup(SocketAddress address,
NetworkInterface networkInterface,
List<String> hosts)
Bind to multicast group.
|
ByteBuffer |
receive()
Receive UDP datagram.
|
void |
registerSelector(Selector selector) |
void |
setSocketBufferSize(int value)
Set UDP socket buffer size.
|
void joinMulticastGroup(SocketAddress address, NetworkInterface networkInterface, List<String> hosts) throws IOException
address
- remote address.networkInterface
- local network interface.IOException
- socket exception.void close() throws IOException
IOException
ByteBuffer receive() throws IOException
IOException
- socket exception.int getSocketBufferSize()
void setSocketBufferSize(int value) throws IOException
value
- socket buffer size.IOException
- socket exception.void registerSelector(Selector selector) throws ClosedChannelException
ClosedChannelException
Copyright © 2010–2020 Onix Solutions. All rights reserved.