Constructor and Description |
---|
UdpConnector(java.net.InetAddress remote,
int remotePort)
Creates a new UDP connection that send datagrams to the
specified address and port.
|
Modifier and Type | Method and Description |
---|---|
boolean |
available()
This always returns false since the simple DatagramSocket usage
cannot be run in a non-blocking way.
|
protected void |
checkClosed() |
void |
close()
Closes the connection.
|
boolean |
isConnected()
Returns true if this connector is currently connected.
|
java.nio.ByteBuffer |
read()
Reads a chunk of data from the connection, blocking if
there is no data available.
|
void |
write(java.nio.ByteBuffer data)
Writes a chunk of data to the connection from data.position()
to data.limit().
|
public UdpConnector(java.net.InetAddress remote, int remotePort) throws java.io.IOException
java.io.IOException
protected void checkClosed()
public boolean isConnected()
Connector
isConnected
in interface Connector
public void close()
Connector
public boolean available()
public java.nio.ByteBuffer read()
Connector