java.lang.Object
net.i2p.util.SimpleTimer2.TimedEvent
net.i2p.client.streaming.impl.Connection.TLProbeEvent
- All Implemented Interfaces:
Runnable
- Enclosing class:
Connection
Tail Loss Probe: fire at ~2*RTT to detect loss before the RTO timer. Re-sends the oldest unacked packet as a probe. If the original was lost, the probe fills the gap and the peer's ACK triggers fast recovery. If the original was delivered, the duplicate triggers ackImmediately().
Re-armed in ackPackets() whenever the head of the window is stuck while later packets are ACKed, so a single lost head-of-line packet is probed at ~2*RTT instead of waiting on an RTO that partial-ACK push-back keeps deferring. Does NOT trigger congestion control (probe may not be lost).
Field Summary
FieldsFields inherited from class SimpleTimer2.TimedEvent
_state, DEFAULT_FUZZModifier and TypeFieldDescriptionprotected SimpleTimer2.TimedEventStateState of the current event.protected static final intDefault fuzz threshold in milliseconds.Constructor Summary
ConstructorsMethod Summary
Public MethodsModifier and TypeMethodDescriptionbooleancancel()Cancel the pending probe, if any.(package private) voidscheduleProbe(int delayMs) Schedules a throughput probe.voidSend the tail loss probe when the timer fires.Methods inherited from class SimpleTimer2.TimedEvent
forceReschedule, reschedule, reschedule, run, schedule, setFuzz, setPool, toStringModifier and TypeMethodDescriptionvoidforceReschedule(long timeoutMs) Always use the new time - ignores fuzz.voidreschedule(long timeoutMs) Use the earliest of the new time and the old time May be called from within timeReached(), but schedule() is better there.voidreschedule(long timeoutMs, boolean useEarliestTime) May be called from within timeReached(), but schedule() is better there.voidrun()voidschedule(long timeoutMs) Schedule this event.voidsetFuzz(int fuzz) Reschedule threshold in ms.voidsetPool(SimpleTimer2 pool) Timer pool for this event.toString()Timer summary for log messages.
Field Details
_pending
private volatile boolean _pendingWhether a probe is already scheduled.
Constructor Details
TLProbeEvent
TLProbeEvent()The timer event that fires a throughput probe.
Method Details
scheduleProbe
void scheduleProbe(int delayMs) Schedules a throughput probe.- Parameters:
delayMs- how long to wait before probing, in milliseconds
cancel
public boolean cancel()Cancel the pending probe, if any.- Overrides:
cancelin classSimpleTimer2.TimedEvent- Returns:
- true if the event will not execute, false if already idle/cancelled
timeReached
public void timeReached()Send the tail loss probe when the timer fires.- Specified by:
timeReachedin classSimpleTimer2.TimedEvent