public class SocketConnector extends NXTCommConnector
Constructor and Description |
---|
SocketConnector() |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel()
Cancel a connection attempt.
|
NXTConnection |
connect(java.lang.String target,
int mode)
Open a connection to the specified name/address using the given I/O mode
|
NXTConnection |
waitForConnection(int timeout,
int mode)
Wait for an incoming connection, or for the request to timeout.
|
public NXTConnection connect(java.lang.String target, int mode)
NXTCommConnector
connect
in class NXTCommConnector
target
- The name or address of the device/host to connect to.mode
- The I/O mode to use for this connectionpublic NXTConnection waitForConnection(int timeout, int mode)
NXTCommConnector
waitForConnection
in class NXTCommConnector
timeout
- Time in ms to wait for the connection to be mademode
- I/O mode to be used for the accepted connection.public boolean cancel()
NXTCommConnector
cancel
in class NXTCommConnector