PacketSpaceManager and QuicConnectionImpl.
The PacketSpaceManager uses functionalities provided
by a PacketEmitter when it deems that a packet needs
to be retransmitted, or that an acknowledgement is due.
It also uses the emitter's timer facility
when it needs to register a QuicTimedEvent.
API Note
All these methods are actually implemented by QuicConnectionImpl
but the PacketEmitter interface makes it possible to write
unit tests against a PacketSpaceManager without involving
any QuicConnection instance.
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | checkAbort(QuicPacket.
Abort the connection if needed, for example if the peer is not responding or max idle time was reached |
| public long | Returns: the emitted packet number, or -1L if not applicable or not emittedthe packet space manager on behalf
of which the acknowledgement should
be sent. packetSpaceManager, AckFrame the ACK frame to be sent. ackFrame, boolean whether a PING frame should be sent. sendPing)Emit a possibly non ACK-eliciting packet containing the given ACK frame. |
| public Executor | Returns: an executor to use when offloading loops to another thread is requiredReturns an executor to use when offloading loops to another thread is required. |
| public boolean | Returns: true if this emitter is open for transmitting packets, else returns falseReturns true if this emitter is open for transmitting packets, else returns false. |
| public default String | |
| public default void | |
| public default void | |
| public default void | reschedule(QuicTimedEvent
the event to reschedule event, Deadline deadline)Reschedule the given event on the |
| public void | retransmit(PacketSpace
the packet space manager on behalf of
which the packet is being retransmitted packetSpaceManager, QuicPacket the unacknowledged packet which should be retransmitted packet, int the number of previous retransmission of this packet.
A value of 0 indicates the first retransmission. attempts)Retransmit the given packet on behalf of the given packet space manager. |
| public boolean | Returns: true if a packet was sent, false otherwisecurrent packet number space packetNumberSpaceCalled when congestion controller allows sending one packet |
| public QuicTimerQueue | Returns: the timer queue used by this packet emitterReturns the timer queue used by this packet emitter. |
| acknowledged | back to summary |
|---|---|
| public void acknowledged(QuicPacket packet) Called when a packet has been acknowledged.
| |
| checkAbort | back to summary |
|---|---|
| public void checkAbort(QuicPacket. Abort the connection if needed, for example if the peer is not responding or max idle time was reached | |
| emitAckPacket | back to summary |
|---|---|
| public long emitAckPacket(PacketSpace packetSpaceManager, AckFrame ackFrame, boolean sendPing) throws QuicKeyUnavailableException, QuicTransportException Emit a possibly non ACK-eliciting packet containing the given ACK frame.
| |
| executor | back to summary |
|---|---|
| public Executor executor() Returns an executor to use when offloading loops to another thread is required.
| |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Returns true if this emitter is open for transmitting packets, else returns false.
| |
| logTag | back to summary |
|---|---|
| public default String logTag() | |
| ptoBackoffIncreased | back to summary |
|---|---|
| public default void ptoBackoffIncreased(PacketSpaceManager space, long backoff) | |
| reschedule | back to summary |
|---|---|
| public default void reschedule(QuicTimedEvent event) Reschedule the given event on the
| |
| reschedule | back to summary |
|---|---|
| public default void reschedule(QuicTimedEvent event, Deadline deadline) Reschedule the given event on the
| |
| retransmit | back to summary |
|---|---|
| public void retransmit(PacketSpace packetSpaceManager, QuicPacket packet, int attempts) throws QuicKeyUnavailableException, QuicTransportException Retransmit the given packet on behalf of the given packet space manager.
| |
| sendData | back to summary |
|---|---|
| public boolean sendData(QuicPacket. Called when congestion controller allows sending one packet
| |
| timer | back to summary |
|---|---|
| public QuicTimerQueue timer() Returns the timer queue used by this packet emitter.
| |