com.jme3.network
Class Network.NetworkClientImpl

java.lang.Object
  extended by com.jme3.network.base.DefaultClient
      extended by com.jme3.network.Network.NetworkClientImpl
All Implemented Interfaces:
Client, MessageConnection, NetworkClient
Enclosing class:
Network

protected static class Network.NetworkClientImpl
extends DefaultClient
implements NetworkClient


Nested Class Summary
 
Nested classes/interfaces inherited from class com.jme3.network.base.DefaultClient
DefaultClient.Redispatch
 
Constructor Summary
Network.NetworkClientImpl(java.lang.String gameName, int version)
           
 
Method Summary
 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.
 
Methods inherited from class com.jme3.network.base.DefaultClient
addClientStateListener, addErrorListener, addMessageListener, addMessageListener, checkRunning, close, closeConnections, configureChannels, dispatch, fireConnected, fireDisconnected, getGameName, getId, getVersion, handleError, isConnected, removeClientStateListener, removeErrorListener, removeMessageListener, removeMessageListener, send, send, send, setPrimaryConnectors, start, waitForConnected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jme3.network.Client
addClientStateListener, addErrorListener, addMessageListener, addMessageListener, close, getGameName, getId, getVersion, isConnected, removeClientStateListener, removeErrorListener, removeMessageListener, removeMessageListener, send, send, start
 

Constructor Detail

Network.NetworkClientImpl

public Network.NetworkClientImpl(java.lang.String gameName,
                                 int version)
Method Detail

connectToServer

public void connectToServer(java.lang.String host,
                            int port,
                            int remoteUdpPort)
                     throws java.io.IOException
Description copied from interface: NetworkClient
Connects this client to the specified remote server and ports.

Specified by:
connectToServer in interface NetworkClient
Throws:
java.io.IOException

connectToServer

public void connectToServer(java.net.InetAddress address,
                            int port,
                            int remoteUdpPort)
                     throws java.io.IOException
Description copied from interface: NetworkClient
Connects this client to the specified remote server and ports.

Specified by:
connectToServer in interface NetworkClient
Parameters:
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.
Throws:
java.io.IOException