public interface NetworkClient extends Client
CHANNEL_DEFAULT_RELIABLE, CHANNEL_DEFAULT_UNRELIABLE
Modifier and Type | Method and Description |
---|---|
void |
connectToServer(java.net.InetAddress address,
int port,
int remoteUdpPort)
Connects this client to the specified remote server and ports.
|
void |
connectToServer(java.lang.String host,
int port,
int remoteUdpPort)
Connects this client to the specified remote server and ports.
|
addClientStateListener, addErrorListener, addMessageListener, addMessageListener, close, getGameName, getId, getServices, getVersion, isConnected, isStarted, removeClientStateListener, removeErrorListener, removeMessageListener, removeMessageListener, send, send, start
void connectToServer(java.lang.String host, int port, int remoteUdpPort) throws java.io.IOException
java.io.IOException
void connectToServer(java.net.InetAddress address, int port, int remoteUdpPort) throws java.io.IOException
address
- The hosts internet address.port
- The remote TCP port on the server to which this client should
send reliable messages.remoteUdpPort
- The remote UDP port on the server to which this client should
send 'fast'/unreliable messages. Set to -1 if 'fast' traffic should
go over TCP. This will completely disable UDP traffic for this
client.java.io.IOException