mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 04:18:12 +02:00
cleanup initialization of min RTT member variables
This commit is contained in:
parent
b817e72976
commit
974cccf519
2 changed files with 9 additions and 4 deletions
|
@ -22,6 +22,11 @@ TCPVegasCC::TCPVegasCC() {
|
||||||
_congestionWindowSize = 2;
|
_congestionWindowSize = 2;
|
||||||
|
|
||||||
setAckInterval(1); // TCP sends an ACK for every packet received
|
setAckInterval(1); // TCP sends an ACK for every packet received
|
||||||
|
|
||||||
|
// set our minimum RTT variables to the maximum possible value
|
||||||
|
// we can't do this as a member initializer until our VS has support for constexpr
|
||||||
|
_currentMinRTT = std::numeric_limits<int>::max();
|
||||||
|
_baseRTT = std::numeric_limits<int>::max();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TCPVegasCC::onACK(SequenceNumber ack, p_high_resolution_clock::time_point receiveTime) {
|
bool TCPVegasCC::onACK(SequenceNumber ack, p_high_resolution_clock::time_point receiveTime) {
|
||||||
|
|
|
@ -52,14 +52,14 @@ private:
|
||||||
|
|
||||||
SequenceNumber _lastACK; // Sequence number of last packet that was ACKed
|
SequenceNumber _lastACK; // Sequence number of last packet that was ACKed
|
||||||
|
|
||||||
int _numACKSinceFastRetransmit { 3 }; // Number of ACKs received since last fast re-transmit
|
int _numACKSinceFastRetransmit { 3 }; // Number of ACKs received since fast re-transmit, default avoids immediate re-transmit
|
||||||
|
|
||||||
int _currentMinRTT { 0x7FFFFFFF }; // Current RTT, in microseconds
|
int _currentMinRTT; // Current min RTT during last RTT (since last congestion avoidance check), in microseconds
|
||||||
int _baseRTT { 0x7FFFFFFF }; // Lowest RTT during connection, in microseconds
|
int _baseRTT; // Lowest RTT during connection, in microseconds
|
||||||
int _ewmaRTT { -1 }; // Exponential weighted moving average RTT
|
int _ewmaRTT { -1 }; // Exponential weighted moving average RTT
|
||||||
int _rttVariance { 0 }; // Variance in collected RTT values
|
int _rttVariance { 0 }; // Variance in collected RTT values
|
||||||
|
|
||||||
int _numACKs { 0 }; // Holds the number of ACKs received during the last RTT
|
int _numACKs { 0 }; // Number of ACKs received during the last RTT (since last performed congestion avoidance)
|
||||||
|
|
||||||
int _ackAICount { 0 }; // Counter for number of ACKs received for Reno additive increase
|
int _ackAICount { 0 }; // Counter for number of ACKs received for Reno additive increase
|
||||||
int _duplicateACKCount { 0 }; // Counter for duplicate ACKs received
|
int _duplicateACKCount { 0 }; // Counter for duplicate ACKs received
|
||||||
|
|
Loading…
Reference in a new issue