protected static class Network.NetworkClientImpl extends DefaultClient implements NetworkClient
DefaultClient.Redispatch
CHANNEL_DEFAULT_RELIABLE, CHANNEL_DEFAULT_UNRELIABLE
Constructor and Description |
---|
NetworkClientImpl(java.lang.String gameName,
int version) |
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, addStandardServices, checkRunning, close, closeConnections, configureChannels, dispatch, fireConnected, fireDisconnected, getGameName, getId, getServices, getVersion, handleError, isConnected, isStarted, removeClientStateListener, removeErrorListener, removeMessageListener, removeMessageListener, send, send, send, setPrimaryConnectors, start, startServices, waitForConnected
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addClientStateListener, addErrorListener, addMessageListener, addMessageListener, close, getGameName, getId, getServices, getVersion, isConnected, isStarted, removeClientStateListener, removeErrorListener, removeMessageListener, removeMessageListener, send, send, start
public NetworkClientImpl(java.lang.String gameName, int version)
public void connectToServer(java.lang.String host, int port, int remoteUdpPort) throws java.io.IOException
NetworkClient
connectToServer
in interface NetworkClient
java.io.IOException
public void connectToServer(java.net.InetAddress address, int port, int remoteUdpPort) throws java.io.IOException
NetworkClient
connectToServer
in interface NetworkClient
address
- The host's 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