Package com.jme3.network.kernel.udp
Class UdpConnector
java.lang.Object
com.jme3.network.kernel.udp.UdpConnector
- All Implemented Interfaces:
- Connector
A straight forward datagram socket-based UDP connector 
  implementation.
- 
Constructor SummaryConstructorsConstructorDescriptionUdpConnector(InetAddress remote, int remotePort) Creates a new UDP connection that send datagrams to the specified address and port.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanThis always returns false since the simple DatagramSocket usage cannot be run in a non-blocking way.protected voidvoidclose()Closes the connection.booleanReturns true if this connector is currently connected.read()Reads a chunk of data from the connection, blocking if there is no data available.voidwrite(ByteBuffer data) Writes a chunk of data to the connection from data.position() to data.limit().
- 
Constructor Details- 
UdpConnectorCreates a new UDP connection that send datagrams to the specified address and port.- Throws:
- IOException
 
 
- 
- 
Method Details- 
checkClosedprotected void checkClosed()
- 
isConnectedpublic boolean isConnected()Description copied from interface:ConnectorReturns true if this connector is currently connected.- Specified by:
- isConnectedin interface- Connector
 
- 
closepublic void close()Description copied from interface:ConnectorCloses the connection. Any subsequent attempts to read or write will fail with an exception.
- 
availablepublic boolean available()This always returns false since the simple DatagramSocket usage cannot be run in a non-blocking way.
- 
readDescription copied from interface:ConnectorReads a chunk of data from the connection, blocking if there is no data available. The buffer may only be valid until the next read() call is made. Callers should copy the data if they need it for longer than that.
- 
writeDescription copied from interface:ConnectorWrites a chunk of data to the connection from data.position() to data.limit().
 
-