protected static class Network.NetworkClientImpl extends DefaultClient implements NetworkClient
DefaultClient.RedispatchCHANNEL_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, waitForConnectedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddClientStateListener, addErrorListener, addMessageListener, addMessageListener, close, getGameName, getId, getServices, getVersion, isConnected, isStarted, removeClientStateListener, removeErrorListener, removeMessageListener, removeMessageListener, send, send, startpublic NetworkClientImpl(java.lang.String gameName,
int version)
public void connectToServer(java.lang.String host,
int port,
int remoteUdpPort)
throws java.io.IOException
NetworkClientconnectToServer in interface NetworkClientjava.io.IOExceptionpublic void connectToServer(java.net.InetAddress address,
int port,
int remoteUdpPort)
throws java.io.IOException
NetworkClientconnectToServer in interface NetworkClientaddress - 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