onPacketSent method
Register a packet as sent (adds to bytes_in_flight).
Callers MUST only account in-flight packets (those containing ack-eliciting frames). Per RFC 9000 Errata 8240, CONNECTION_CLOSE frames do not count.
Implementation
@override
void onPacketSent(int packetNumber, int size) {
// SECURITY: Reject negative byte counts.
if (size < 0) size = 0;
_bytesInFlight += size;
// Exit app-limited when cwnd is fully utilized.
if (_bytesInFlight >= _congestionWindow) {
_appLimited = false;
}
}