Interface MessageWriteTarget

All Known Implementing Classes:
BlockingClient, NioClient

public interface MessageWriteTarget
A target to which messages can be written/connection can be closed
  • Method Details

    • writeBytes

      ListenableCompletableFuture<Void> writeBytes(byte[] message) throws IOException
      Writes the given bytes to the remote server. The returned future will complete when all bytes have been written to the OS network buffer.
      Throws:
      IOException
    • closeConnection

      void closeConnection()
      Closes the connection to the server, triggering the StreamConnection.connectionClosed() event on the network-handling thread where all callbacks occur.