Interface TransportLayer<P extends Packet<?>>

All Known Implementing Classes:
AsyncDirectTcpTransport, DirectTcpTransport, TunnelTransport

public interface TransportLayer<P extends Packet<?>>
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    connect(InetSocketAddress remoteAddress)
    Connect to the remote side
    void
    Disconnect from the remote side
    boolean
    Checks if the transport layer is currently connected.
    void
    write(P packet)
    Write the packet to the transport.
  • Method Details

    • write

      void write(P packet) throws TransportException
      Write the packet to the transport.
      Parameters:
      packet - The packet to write.
      Throws:
      TransportException
    • connect

      void connect(InetSocketAddress remoteAddress) throws IOException
      Connect to the remote side
      Parameters:
      remoteAddress - The remote address to connect to
      Throws:
      IOException
    • disconnect

      void disconnect() throws IOException
      Disconnect from the remote side
      Throws:
      IOException
    • isConnected

      boolean isConnected()
      Checks if the transport layer is currently connected.