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 // TCP cubic send side congestion algorithm, emulates the behavior of TCP cubic. | 5 // TCP cubic send side congestion algorithm, emulates the behavior of TCP cubic. |
6 | 6 |
7 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BASE_H_ | 7 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BASE_H_ |
8 #define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BASE_H_ | 8 #define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BASE_H_ |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 QuicByteCount bytes_in_flight, | 49 QuicByteCount bytes_in_flight, |
50 const CongestionVector& acked_packets, | 50 const CongestionVector& acked_packets, |
51 const CongestionVector& lost_packets) override; | 51 const CongestionVector& lost_packets) override; |
52 bool OnPacketSent(QuicTime sent_time, | 52 bool OnPacketSent(QuicTime sent_time, |
53 QuicByteCount bytes_in_flight, | 53 QuicByteCount bytes_in_flight, |
54 QuicPacketNumber packet_number, | 54 QuicPacketNumber packet_number, |
55 QuicByteCount bytes, | 55 QuicByteCount bytes, |
56 HasRetransmittableData is_retransmittable) override; | 56 HasRetransmittableData is_retransmittable) override; |
57 void OnRetransmissionTimeout(bool packets_retransmitted) override; | 57 void OnRetransmissionTimeout(bool packets_retransmitted) override; |
58 void OnConnectionMigration() override; | 58 void OnConnectionMigration() override; |
59 QuicTime::Delta TimeUntilSend( | 59 QuicTime::Delta TimeUntilSend(QuicTime now, |
60 QuicTime now, | 60 QuicByteCount bytes_in_flight) const override; |
61 QuicByteCount bytes_in_flight, | |
62 HasRetransmittableData has_retransmittable_data) const override; | |
63 QuicBandwidth PacingRate() const override; | 61 QuicBandwidth PacingRate() const override; |
64 QuicBandwidth BandwidthEstimate() const override; | 62 QuicBandwidth BandwidthEstimate() const override; |
65 QuicTime::Delta RetransmissionDelay() const override; | 63 QuicTime::Delta RetransmissionDelay() const override; |
66 bool InSlowStart() const override; | 64 bool InSlowStart() const override; |
67 bool InRecovery() const override; | 65 bool InRecovery() const override; |
68 | 66 |
69 protected: | 67 protected: |
70 // Called when resuming a previous bandwidth. | 68 // Called when resuming a previous bandwidth. |
71 virtual void SetCongestionWindowFromBandwidthAndRtt(QuicBandwidth bandwidth, | 69 virtual void SetCongestionWindowFromBandwidthAndRtt(QuicBandwidth bandwidth, |
72 QuicTime::Delta rtt) = 0; | 70 QuicTime::Delta rtt) = 0; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 // When true, exit slow start with large cutback of congestion window. | 139 // When true, exit slow start with large cutback of congestion window. |
142 bool slow_start_large_reduction_; | 140 bool slow_start_large_reduction_; |
143 | 141 |
144 private: | 142 private: |
145 DISALLOW_COPY_AND_ASSIGN(TcpCubicSenderBase); | 143 DISALLOW_COPY_AND_ASSIGN(TcpCubicSenderBase); |
146 }; | 144 }; |
147 | 145 |
148 } // namespace net | 146 } // namespace net |
149 | 147 |
150 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BASE_H_ | 148 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BASE_H_ |
OLD | NEW |