| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 const CongestionVector& lost_packets) override; | 54 const CongestionVector& lost_packets) override; |
| 55 bool OnPacketSent(QuicTime sent_time, | 55 bool OnPacketSent(QuicTime sent_time, |
| 56 QuicByteCount bytes_in_flight, | 56 QuicByteCount bytes_in_flight, |
| 57 QuicPacketNumber packet_number, | 57 QuicPacketNumber packet_number, |
| 58 QuicByteCount bytes, | 58 QuicByteCount bytes, |
| 59 HasRetransmittableData is_retransmittable) override; | 59 HasRetransmittableData is_retransmittable) override; |
| 60 void OnRetransmissionTimeout(bool packets_retransmitted) override; | 60 void OnRetransmissionTimeout(bool packets_retransmitted) override; |
| 61 void OnConnectionMigration() override; | 61 void OnConnectionMigration() override; |
| 62 QuicTime::Delta TimeUntilSend(QuicTime now, | 62 QuicTime::Delta TimeUntilSend(QuicTime now, |
| 63 QuicByteCount bytes_in_flight) const override; | 63 QuicByteCount bytes_in_flight) const override; |
| 64 QuicBandwidth PacingRate() const override; | 64 QuicBandwidth PacingRate(QuicByteCount bytes_in_flight) const override; |
| 65 QuicBandwidth BandwidthEstimate() const override; | 65 QuicBandwidth BandwidthEstimate() const override; |
| 66 QuicTime::Delta RetransmissionDelay() const override; | 66 QuicTime::Delta RetransmissionDelay() const override; |
| 67 bool InSlowStart() const override; | 67 bool InSlowStart() const override; |
| 68 bool InRecovery() const override; | 68 bool InRecovery() const override; |
| 69 | 69 |
| 70 protected: | 70 protected: |
| 71 // Called when resuming a previous bandwidth. | 71 // Called when resuming a previous bandwidth. |
| 72 virtual void SetCongestionWindowFromBandwidthAndRtt(QuicBandwidth bandwidth, | 72 virtual void SetCongestionWindowFromBandwidthAndRtt(QuicBandwidth bandwidth, |
| 73 QuicTime::Delta rtt) = 0; | 73 QuicTime::Delta rtt) = 0; |
| 74 | 74 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 // Whether to use 4 packets as the actual min, but pace lower. | 136 // Whether to use 4 packets as the actual min, but pace lower. |
| 137 bool min4_mode_; | 137 bool min4_mode_; |
| 138 | 138 |
| 139 // Whether the last loss event caused us to exit slowstart. | 139 // Whether the last loss event caused us to exit slowstart. |
| 140 // Used for stats collection of slowstart_packets_lost | 140 // Used for stats collection of slowstart_packets_lost |
| 141 bool last_cutback_exited_slowstart_; | 141 bool last_cutback_exited_slowstart_; |
| 142 | 142 |
| 143 // When true, exit slow start with large cutback of congestion window. | 143 // When true, exit slow start with large cutback of congestion window. |
| 144 bool slow_start_large_reduction_; | 144 bool slow_start_large_reduction_; |
| 145 | 145 |
| 146 // When true, use rate based sending instead of only sending if there's CWND. |
| 147 bool rate_based_sending_; |
| 148 |
| 146 // When true, use unity pacing instead of PRR. | 149 // When true, use unity pacing instead of PRR. |
| 147 bool no_prr_; | 150 bool no_prr_; |
| 148 | 151 |
| 149 private: | 152 private: |
| 150 DISALLOW_COPY_AND_ASSIGN(TcpCubicSenderBase); | 153 DISALLOW_COPY_AND_ASSIGN(TcpCubicSenderBase); |
| 151 }; | 154 }; |
| 152 | 155 |
| 153 } // namespace net | 156 } // namespace net |
| 154 | 157 |
| 155 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BASE_H_ | 158 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BASE_H_ |
| OLD | NEW |