Interface NetworkClient

All Superinterfaces:
AutoCloseable, NetworkComponent, PacketSender

public interface NetworkClient extends NetworkComponent, AutoCloseable
Represents a network component which can be connected to any network server.
Since:
4.0
  • Method Details

    • connect

      Connects this network client to the network server running at the given host and port.
      Parameters:
      hostAndPort - the target host and port to which the client should get connected.
      Returns:
      a task completed successfully, or with the exception thrown during the connection process.
      Throws:
      NullPointerException - if the given host and port is null.