const int64 kInitialCongestionWindow = 10;
const int kMaxBurstLength = 3;
// Constants used for RTT calculation.
-const int kInitialRttMs = 60; // At a typical RTT 60 ms.
+const int kInitialRttMs = 100; // At a typical RTT 100 ms.
const float kAlpha = 0.125f;
const float kOneMinusAlpha = (1 - kAlpha);
const float kBeta = 0.25f;
reno_(reno),
congestion_window_count_(0),
receive_window_(kDefaultReceiveWindow),
- last_received_accumulated_number_of_lost_packets_(0),
bytes_in_flight_(0),
prr_out_(0),
prr_delivered_(0),
const QuicCongestionFeedbackFrame& feedback,
QuicTime feedback_receive_time,
const SentPacketsMap& /*sent_packets*/) {
- if (last_received_accumulated_number_of_lost_packets_ !=
- feedback.tcp.accumulated_number_of_lost_packets) {
- int recovered_lost_packets =
- last_received_accumulated_number_of_lost_packets_ -
- feedback.tcp.accumulated_number_of_lost_packets;
- last_received_accumulated_number_of_lost_packets_ =
- feedback.tcp.accumulated_number_of_lost_packets;
- if (recovered_lost_packets > 0) {
- // Assume the loss could be as late as the last acked packet.
- OnPacketLost(largest_acked_sequence_number_, feedback_receive_time);
- }
- }
receive_window_ = feedback.tcp.receive_window;
}
} else {
mean_deviation_ = QuicTime::Delta::FromMicroseconds(
kOneMinusBeta * mean_deviation_.ToMicroseconds() +
- kBeta * abs(smoothed_rtt_.ToMicroseconds() - rtt.ToMicroseconds()));
+ kBeta *
+ std::abs(smoothed_rtt_.ToMicroseconds() - rtt.ToMicroseconds()));
smoothed_rtt_ = QuicTime::Delta::FromMicroseconds(
kOneMinusAlpha * smoothed_rtt_.ToMicroseconds() +
kAlpha * rtt.ToMicroseconds());