Class RetransmissionQueue

java.lang.Object
org.drasyl.handler.connection.RetransmissionQueue

public class RetransmissionQueue extends Object
Represents the retransmission queue that holds segments that need to be retransmitted due to timeout or loss in a connection.

The retransmission queue is used by the sender to keep track of segments that have been sent but not yet acknowledged, and need to be retransmitted after a certain period of time due to timeout or loss in the network.

  • Method Details

    • add

      public void add(io.netty.channel.ChannelHandlerContext ctx, Segment seg, TransmissionControlBlock tcb)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • removeAcknowledged

      public boolean removeAcknowledged(io.netty.channel.ChannelHandlerContext ctx, TransmissionControlBlock tcb)
    • release

      public void release()
    • firstSegmentSentTime

      public long firstSegmentSentTime()
    • size

      public int size()
      Returns the number of elements in this deque.
      Returns:
      the number of elements in this deque
    • isEmpty

      public boolean isEmpty()
      Returns true if this deque contains no elements.
      Returns:
      true if this deque contains no elements