OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/fix_rate_sender.h" | 5 #include "net/quic/congestion_control/fix_rate_sender.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 TransmissionType transmission_type, | 80 TransmissionType transmission_type, |
81 HasRetransmittableData /*has_retransmittable_data*/) { | 81 HasRetransmittableData /*has_retransmittable_data*/) { |
82 fix_rate_leaky_bucket_.Add(sent_time, bytes); | 82 fix_rate_leaky_bucket_.Add(sent_time, bytes); |
83 paced_sender_.OnPacketSent(sent_time, bytes); | 83 paced_sender_.OnPacketSent(sent_time, bytes); |
84 if (transmission_type == NOT_RETRANSMISSION) { | 84 if (transmission_type == NOT_RETRANSMISSION) { |
85 data_in_flight_ += bytes; | 85 data_in_flight_ += bytes; |
86 } | 86 } |
87 return true; | 87 return true; |
88 } | 88 } |
89 | 89 |
90 void FixRateSender::OnRetransmissionTimeout() { } | 90 void FixRateSender::OnRetransmissionTimeout(bool packets_retransmitted) { } |
91 | 91 |
92 void FixRateSender::OnPacketAbandoned( | 92 void FixRateSender::OnPacketAbandoned( |
93 QuicPacketSequenceNumber /*sequence_number*/, | 93 QuicPacketSequenceNumber /*sequence_number*/, |
94 QuicByteCount /*abandoned_bytes*/) { | 94 QuicByteCount /*abandoned_bytes*/) { |
95 } | 95 } |
96 | 96 |
97 QuicTime::Delta FixRateSender::TimeUntilSend( | 97 QuicTime::Delta FixRateSender::TimeUntilSend( |
98 QuicTime now, | 98 QuicTime now, |
99 TransmissionType /* transmission_type */, | 99 TransmissionType /* transmission_type */, |
100 HasRetransmittableData /*has_retransmittable_data*/, | 100 HasRetransmittableData /*has_retransmittable_data*/, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // TODO(pwestin): Calculate and return retransmission delay. | 134 // TODO(pwestin): Calculate and return retransmission delay. |
135 // Use 2 * the latest RTT for now. | 135 // Use 2 * the latest RTT for now. |
136 return latest_rtt_.Add(latest_rtt_); | 136 return latest_rtt_.Add(latest_rtt_); |
137 } | 137 } |
138 | 138 |
139 QuicByteCount FixRateSender::GetCongestionWindow() const { | 139 QuicByteCount FixRateSender::GetCongestionWindow() const { |
140 return 0; | 140 return 0; |
141 } | 141 } |
142 | 142 |
143 } // namespace net | 143 } // namespace net |
OLD | NEW |