Interface TcpConnection<P>

    • Method Detail

      • send

        ListenableFuture<Voidsend​(Message<P> message)
        Send the given message.
        Parameters:
        message - the message
        Returns:
        a ListenableFuture that can be used to determine when and if the message was successfully sent
      • onReadInactivity

        void onReadInactivity​(Runnable runnable,
                              long duration)
        Register a task to invoke after a period of read inactivity.
        Parameters:
        runnable - the task to invoke
        duration - the amount of inactive time in milliseconds
      • onWriteInactivity

        void onWriteInactivity​(Runnable runnable,
                               long duration)
        Register a task to invoke after a period of write inactivity.
        Parameters:
        runnable - the task to invoke
        duration - the amount of inactive time in milliseconds