CubicCongestionController class
RFC 8312 / RFC 9002 CUBIC congestion controller.
CUBIC uses a cubic function of elapsed time since last loss to grow cwnd: W_cubic(t) = C*(t - K)^3 + W_max where K = cubic_root(W_max * (1 - β_cubic) / C) and β_cubic = 0.7 (multiplicative decrease factor)
C is the CUBIC scaling factor (default 0.4).
- Implemented types
Constructors
- CubicCongestionController({int initialCwnd = 2, int packetSize = 1200})
Properties
- appLimited → bool
-
Whether the application is currently limited (not sending enough
to fill the congestion window).
no setteroverride
- bytesInFlight → int
-
Bytes currently in flight.
no setteroverride
- congestionWindow → int
-
Current congestion window in bytes.
no setteroverride
- cwndInPackets → int
-
Current cwnd in packets (exposed for testing).
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- wMax → int
-
W_max in packets (exposed for testing fast convergence).
no setter
Methods
-
canSend(
int bytes) → bool -
Whether sending
byteswould exceed the congestion window.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 -
React to a detected packet loss.
override
-
onPacketSent(
int packetNumber, int size) → void -
Register a sent packet.
override
-
onPersistentCongestion(
) → void -
React to persistent congestion being declared (RFC 9002 §7.6).
override
-
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