PacketSpaceManager takes care of acknowledgement and
retransmission of packets for a given PacketNumberSpace.
| Modifier and Type | Class and Description |
|---|---|
| private class | PacketSpaceManager.
A class to keep track of the largest packet that was acknowledged by a packet that is being acknowledged. |
| private static class | |
| pack-priv static class | |
| pack-priv static record | PacketSpaceManager.
A record that stores the next AckFrame that should be sent within this packet number space. |
| pack-priv static class | |
| pack-priv class | PacketSpaceManager.
A task that sends packets to the peer. |
| private static record | PacketSpaceManager.
A record to store a packet that hasn't been acknowledged, and should be scheduled for retransmission if not acknowledged when the deadline is reached. |
| private static record | PacketSpaceManager.
A record used to implement |
| private static record | PacketSpaceManager.
A record to store previous numbers with which a packet has been retransmitted. |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| public static final int | |
| private volatile boolean | |
| private volatile boolean | |
| pack-priv volatile boolean | |
| private final QuicCongestionController | |
| protected final Logger | |
| private final Supplier | |
| private final PacketSpaceManager. | |
| private volatile boolean | |
| private volatile boolean | |
| private long | |
| private final TimeLine | |
| private static final long | |
| private static final int | |
| private volatile long | |
| private volatile long | |
| private volatile long | |
| private volatile long | |
| private volatile long | |
| private volatile long | |
| private volatile Deadline | |
| private final ConcurrentLinkedQueue | |
| public static final int | |
| public static final int | |
| private final long | |
| private volatile PacketSpaceManager. | |
| private final AtomicLong | |
| private final PacketEmitter | |
| private final QuicPacket. | |
| private final PacketSpaceManager. | |
| private volatile long | |
| private volatile long | |
| private final ConcurrentLinkedQueue | |
| private final ConcurrentLinkedQueue | |
| private final ConcurrentLinkedQueue | |
| private volatile CompletableFuture | |
| private final QuicTLSEngine | |
| private final QuicRttEstimator | |
| private final ConcurrentSkipListMap | |
| public static final int | |
| private final ReentrantLock | |
| private final ReentrantLock | |
| private volatile boolean | |
| private final ConcurrentLinkedQueue |
| Access | Constructor and Description |
|---|---|
| public | PacketSpaceManager(final QuicConnectionImpl
The connection for which this manager
is created. connection, final QuicPacket.The packet number space. packetNumberSpaceCreates a new |
| public | PacketSpaceManager(QuicPacket.
the packet number space. packetNumberSpace,the packet emitter packetEmitter, TimeLine instantSource, QuicRttEstimator rttEstimator, QuicCongestionController the congestion controller congestionController, QuicTLSEngine quicTLSEngine, Supplier<String> a supplier for a debug tag to use for logging purposes debugStrSupplier)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| private long | |
| private void | |
| private void | |
| public long | allocateNextPN()
Implements jdk. Returns a new packet number atomically allocated in this space. |
| private void | |
| private void | |
| public void | close()
Implements jdk. Stops retransmission for this packet space. |
| private Deadline | computeNewDeadlineFor(AckFrame frame, Deadline now, Deadline deadline, long packetNumber, long previousLargest, long ackDelay)
|
| public Deadline | Returns: the deadline at which the scheduler's task for this packet space should be scheduled to wake upComputes the next deadline for generating a non ACK eliciting packet containing the next ACK frame, or for retransmitting unacknowledged packets for which retransmission is due. |
| public Deadline | |
| public void | confirmHandshake()
Implements jdk. Signals that the peer confirmed the handshake. |
| pack-priv Deadline | |
| pack-priv void | |
| pack-priv void | |
| private int | detectAndRemoveLostPackets(Deadline
current time, used for time-based loss detection. now)Returns the count of unacknowledged packets that were declared lost. |
| private long | Returns: the packet number of the emitted packetThe ACK frame to send. ackFrame, boolean sendPing)Called by the |
| public void | fastRetransmit()
Implements jdk. Immediately retransmit one unacknowledged initial packet |
| public long | getLargestPeerAckedPN()
Implements jdk. The largest received acked PN is used to compute the packet number that we include in an outgoing Quic packet. |
| public long | getLargestProcessedPN()
Implements jdk. The largest processed PN is used to compute the packet number of an incoming Quic packet. |
| public long | getLargestSentAckedPN()
Implements jdk. Returns the largest packet number that we have acknowledged in this space. |
| private Deadline | |
| public long | Returns: the max delay before emitting a non ACK-eliciting packet to acknowledge a received ACK-eliciting packet, in millisecondsReturns the max delay before emitting a non ACK-eliciting packet to acknowledge a received ACK-eliciting packet, in milliseconds. |
| public long | getMinPNThreshold()
Implements jdk. Returns the packet number threshold below which packets should be discarded without being processed in this space. |
| private PacketSpaceManager. | |
| public AckFrame | getNextAckFrame(boolean onlyOverdue)
Implements jdk. Get the next ack frame to send. |
| public AckFrame | getNextAckFrame(boolean onlyOverdue, int maxSize)
Implements jdk. Get the next ack frame to send. |
| public AtomicLong | |
| public long | Returns: the max ACK delay of the peer, in millisecondsReturns the max ACK delay of the peer, in milliseconds. |
| pack-priv Duration | |
| private Deadline | |
| pack-priv Duration | |
| public ReentrantLock | getTransmitLock()
Implements jdk. Returns a lock used by the transmission task. |
| public boolean | isAcknowledged(long packetNumber)
Implements jdk. Returns true if a packet with that packet number is already being acknowledged (will be, or has been acknowledged). |
| private boolean | isAcknowledgingLostPacket(PacketSpaceManager.
|
| private boolean | |
| public boolean | isClosed()
Implements jdk. Returns true if this packet space is closed. |
| pack-priv boolean | |
| private boolean | Returns: true if this packet space isn't closed and if the underlying packet emitter is open, else returns falseReturns true if this packet space isn't closed and if the underlying packet emitter is open, else returns false. |
| private boolean | |
| private boolean | |
| private long | |
| private synchronized void | |
| private Deadline | |
| private static Deadline | |
| public Deadline | Returns: the next deadline at which the scheduler's task for this packet space is currently scheduled to wake upReturns the next deadline at which the scheduler's task for this packet space is currently scheduled to wake up. |
| private Deadline | |
| public QuicPacket. | packetNumberSpace()
Implements jdk. Returns the packet number space managed by this class. |
| private long | |
| public void | packetReceived(QuicPacket.
Implements jdk. Called when a packet is received. |
| public void | packetSent(QuicPacket packet, long previousPacketNumber, long packetNumber)
Implements jdk. Signals that a packet has been sent. |
| pack-priv QuicPacket. | |
| private long | |
| public <T> T | |
| public <T> T | |
| public void | processAckFrame(AckFrame frame)
Implements jdk. Processes a received ACK frame. |
| private void | processPingResponses(long
the acknowledged packet number packetNumber)Theoretically we should wait for the packet that contains the ping frame to be acknowledged, but if we receive the ack of a packet with a larger number, we can assume that the connection is still alive, and therefore complete the ping response. |
| pack-priv Deadline | |
| private void | |
| private void | |
| public CompletableFuture | Returns: a completable future that will be completed with the time it took, in milliseconds, for the peer to acknowledge the packet that contained the PingFrame (or any packet that was sent after)Implements jdk. Used to request sending of a ping frame, for instance, to verify that the connection is alive. |
| private boolean | |
| private void | |
| public void | retry()
Implements jdk. This method is called by |
| public void | runTransmitter()
Implements jdk. Triggers immediate run of transmit loop. |
| private boolean | |
| private QuicTLSEngine. | tlsEncryptionLevel()
returns the TLS encryption level of this packet space as specified in RFC-9001, section 4, table 1. |
| private boolean | Returns: whether the given pending unacknowledged packet is being acknowledged by this ack frame.a yet unacknowledged packet that may be acknowledged
by the given pending,AckFrame.a received frame)AckFrameTracks the largest packet acknowledged by the packets acknowledged in the given AckFrame. |
| public <T> T | |
| public void | updatePeerTransportParameters(long
the new delay, in milliseconds peerDelay, long the new ack delay exponent ackDelayExponent)Implements jdk. Changes the value of the peer max ACK delay and ack delay exponent |
| public void | versionChanged()
Implements jdk. This method is called by |