java.net
Class ServerSocket
java.lang.Object
java.net.ServerSocket
public class ServerSocket
- extends Object
Communicates with a ServerProxy on the PC to provide a
ServerSocket interface applications on the NXT.
Method Summary |
Socket |
accept()
Waits until there is a socket connection available. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServerSocket
public ServerSocket(int port,
NXTConnection nxtc)
throws IOException
- Constructor. Creates a new Server Socket over a Bluetooth or USB connection
- Parameters:
port
- The port to listen onnxtc
- The connection to open
- Throws:
IOException
accept
public Socket accept()
throws IOException
- Waits until there is a socket connection available. When this becomes true
a new Socket is returned
- Returns:
- Socket the socket
- Throws:
IOException