CongestionController class

NewReno congestion controller per RFC 9002 Section 7.

Implements slow start, congestion avoidance, and recovery.

Implemented types

Constructors

CongestionController()

Properties

appLimited bool
Whether the application is currently limited.
no setteroverride
bytesInFlight int
Bytes in flight.
no setteroverride
congestionWindow int
Current congestion window in bytes.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
inRecovery bool
Whether in recovery.
no setter
inSlowStart bool
Whether in slow start.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
ssthresh int
Slow start threshold. -1 means no threshold (always in slow start).
no setter

Methods

canSend(int bytes) bool
Can we send bytes?
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAckReceived(int largestAcked, int newlyAckedBytes, DateTime now) → void
Process an ACK.
override
onECNCEMarked(int count) → void
React to ECN Congestion Experienced (CE) marks.
override
onPacketLost(int packetNumber, int lostBytes, DateTime now) → void
Enter recovery (on loss detection).
override
onPacketSent(int packetNumber, int size) → void
Register a packet as sent (adds to bytes_in_flight).
override
onPersistentCongestion() → void
Persistent congestion declared (RFC 9002 §7.6).
override
onRecoveryExit() → void
Exit recovery (RFC 9002 §7.3.2).
onRttSample(Duration rtt) → void
Record an RTT sample.
override
reset() → void
Reset to initial state.
override
setAppLimited(bool limited) → void
Set the application-limited state.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

initialWindow → const int
Initial congestion window in bytes (RFC 9002: 2 * max_datagram_size, default 1200).
minimumWindow → const int
Minimum congestion window in bytes.