OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/quic/congestion_control/pacing_sender.h" | 5 #include "net/quic/congestion_control/pacing_sender.h" |
6 | 6 |
7 namespace net { | 7 namespace net { |
8 | 8 |
9 PacingSender::PacingSender(SendAlgorithmInterface* sender, | 9 PacingSender::PacingSender(SendAlgorithmInterface* sender, |
10 QuicTime::Delta alarm_granularity) | 10 QuicTime::Delta alarm_granularity) |
11 : sender_(sender), | 11 : sender_(sender), |
12 alarm_granularity_(alarm_granularity), | 12 alarm_granularity_(alarm_granularity), |
13 next_packet_send_time_(QuicTime::Zero()), | 13 next_packet_send_time_(QuicTime::Zero()), |
14 was_last_send_delayed_(false), | 14 was_last_send_delayed_(false), |
15 max_segment_size_(kDefaultMaxPacketSize), | |
16 updated_rtt_(false) { | 15 updated_rtt_(false) { |
17 } | 16 } |
18 | 17 |
19 PacingSender::~PacingSender() {} | 18 PacingSender::~PacingSender() {} |
20 | 19 |
21 void PacingSender::SetFromConfig(const QuicConfig& config, bool is_server) { | 20 void PacingSender::SetFromConfig(const QuicConfig& config, bool is_server) { |
22 sender_->SetFromConfig(config, is_server); | 21 sender_->SetFromConfig(config, is_server); |
23 } | 22 } |
24 | 23 |
25 void PacingSender::OnIncomingQuicCongestionFeedbackFrame( | 24 void PacingSender::OnIncomingQuicCongestionFeedbackFrame( |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 119 |
121 QuicBandwidth PacingSender::BandwidthEstimate() const { | 120 QuicBandwidth PacingSender::BandwidthEstimate() const { |
122 return sender_->BandwidthEstimate(); | 121 return sender_->BandwidthEstimate(); |
123 } | 122 } |
124 | 123 |
125 void PacingSender::UpdateRtt(QuicTime::Delta rtt_sample) { | 124 void PacingSender::UpdateRtt(QuicTime::Delta rtt_sample) { |
126 updated_rtt_= true; | 125 updated_rtt_= true; |
127 sender_->UpdateRtt(rtt_sample); | 126 sender_->UpdateRtt(rtt_sample); |
128 } | 127 } |
129 | 128 |
130 QuicTime::Delta PacingSender::SmoothedRtt() const { | |
131 return sender_->SmoothedRtt(); | |
132 } | |
133 | |
134 QuicTime::Delta PacingSender::RetransmissionDelay() const { | 129 QuicTime::Delta PacingSender::RetransmissionDelay() const { |
135 return sender_->RetransmissionDelay(); | 130 return sender_->RetransmissionDelay(); |
136 } | 131 } |
137 | 132 |
138 QuicByteCount PacingSender::GetCongestionWindow() const { | 133 QuicByteCount PacingSender::GetCongestionWindow() const { |
139 return sender_->GetCongestionWindow(); | 134 return sender_->GetCongestionWindow(); |
140 } | 135 } |
141 | 136 |
142 } // namespace net | 137 } // namespace net |
OLD | NEW |