|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.network.kernel.udp.UdpConnector
public class UdpConnector
A straight forward datagram socket-based UDP connector implementation.
Constructor Summary | |
---|---|
UdpConnector(java.net.InetAddress remote,
int remotePort)
Creates a new UDP connection that send datagrams to the specified address and port. |
Method Summary | |
---|---|
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(). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UdpConnector(java.net.InetAddress remote, int remotePort) throws java.io.IOException
java.io.IOException
Method Detail |
---|
protected void checkClosed()
public boolean isConnected()
Connector
isConnected
in interface Connector
public void close()
Connector
close
in interface Connector
public boolean available()
available
in interface Connector
public java.nio.ByteBuffer read()
Connector
read
in interface Connector
public void write(java.nio.ByteBuffer data)
Connector
write
in interface Connector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |