| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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_BYTES_H_ | 7 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BYTES_H_ |
| 8 #define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BYTES_H_ | 8 #define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BYTES_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 | 49 |
| 50 protected: | 50 protected: |
| 51 // TcpCubicSenderBase methods | 51 // TcpCubicSenderBase methods |
| 52 void SetCongestionWindowFromBandwidthAndRtt(QuicBandwidth bandwidth, | 52 void SetCongestionWindowFromBandwidthAndRtt(QuicBandwidth bandwidth, |
| 53 QuicTime::Delta rtt) override; | 53 QuicTime::Delta rtt) override; |
| 54 void SetCongestionWindowInPackets(QuicPacketCount congestion_window) override; | 54 void SetCongestionWindowInPackets(QuicPacketCount congestion_window) override; |
| 55 void SetMinCongestionWindowInPackets( | 55 void SetMinCongestionWindowInPackets( |
| 56 QuicPacketCount congestion_window) override; | 56 QuicPacketCount congestion_window) override; |
| 57 void ExitSlowstart() override; | 57 void ExitSlowstart() override; |
| 58 void OnPacketLost(QuicPacketNumber largest_loss, | 58 void OnPacketLost(QuicPacketNumber largest_loss, |
| 59 QuicByteCount lost_bytes, |
| 59 QuicByteCount bytes_in_flight) override; | 60 QuicByteCount bytes_in_flight) override; |
| 60 void MaybeIncreaseCwnd(QuicPacketNumber acked_packet_number, | 61 void MaybeIncreaseCwnd(QuicPacketNumber acked_packet_number, |
| 61 QuicByteCount acked_bytes, | 62 QuicByteCount acked_bytes, |
| 62 QuicByteCount bytes_in_flight) override; | 63 QuicByteCount bytes_in_flight) override; |
| 63 void HandleRetransmissionTimeout() override; | 64 void HandleRetransmissionTimeout() override; |
| 64 | 65 |
| 65 private: | 66 private: |
| 66 friend class test::TcpCubicSenderBytesPeer; | 67 friend class test::TcpCubicSenderBytesPeer; |
| 67 | 68 |
| 68 CubicBytes cubic_; | 69 CubicBytes cubic_; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 89 // Initial maximum TCP congestion window in bytes. This variable can only be | 90 // Initial maximum TCP congestion window in bytes. This variable can only be |
| 90 // set when this algorithm is created. | 91 // set when this algorithm is created. |
| 91 const QuicByteCount initial_max_tcp_congestion_window_; | 92 const QuicByteCount initial_max_tcp_congestion_window_; |
| 92 | 93 |
| 93 DISALLOW_COPY_AND_ASSIGN(TcpCubicSenderBytes); | 94 DISALLOW_COPY_AND_ASSIGN(TcpCubicSenderBytes); |
| 94 }; | 95 }; |
| 95 | 96 |
| 96 } // namespace net | 97 } // namespace net |
| 97 | 98 |
| 98 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_BYTES_SENDER_H_ | 99 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_BYTES_SENDER_H_ |
| OLD | NEW |