Interface RemoteSocket
public interface RemoteSocket
Instances of this interface represent a TCP socket that other network clients can connect to, typically
created by calling
ControllerHost.createRemoteConnection(java.lang.String, int).- Since:
- API version 1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintgetPort()Gets the actual port used for the remote socket, which might differ from the originally requested port when callingControllerHost.createRemoteConnection(String name, int port)in case the requested port was already used.voidSets a callback which receives a remote connection object for each incoming connection.
-
Method Details
-
setClientConnectCallback
Sets a callback which receives a remote connection object for each incoming connection.- Parameters:
callback- a callback function which receives a singleRemoteConnectionargument- Since:
- API version 1
-
getPort
int getPort()Gets the actual port used for the remote socket, which might differ from the originally requested port when callingControllerHost.createRemoteConnection(String name, int port)in case the requested port was already used.- Returns:
- the actual port used for the remote socket
- Since:
- API version 1
-