Interface NetworkClient

All Superinterfaces:
Client, MessageConnection
All Known Implementing Classes:
Network.NetworkClientImpl

public interface NetworkClient extends Client
A Client whose network connection information can be provided post-creation. The actual connection stack will be setup the same as if Network.connectToServer had been called.
  • Method Details

    • connectToServer

      void connectToServer(String host, int port, int remoteUdpPort) throws IOException
      Connects this client to the specified remote server and ports.
      Throws:
      IOException
    • connectToServer

      void connectToServer(InetAddress address, int port, int remoteUdpPort) throws IOException
      Connects this client to the specified remote server and ports.
      Parameters:
      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.
      Throws:
      IOException