Interface NetworkClient

All Superinterfaces:
AutoCloseable, NetworkComponent, PacketSender
All Known Implementing Classes:
NettyNetworkClient

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

    • connect

      @NonNull @NonNull eu.cloudnetservice.common.concurrent.Task<Void> connect(@NonNull @NonNull HostAndPort hostAndPort)
      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.