|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.network.kernel.tcp.SocketConnector
public class SocketConnector
A straight forward socket-based connector implementation that does not use any separate threading. It relies completely on the buffering in the OS network layer.
Constructor Summary | |
---|---|
SocketConnector(java.net.InetAddress address,
int port)
|
Method Summary | |
---|---|
boolean |
available()
Returns true if there is currently data available for reading. |
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 SocketConnector(java.net.InetAddress address, int port) 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()
Connector
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 |