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 | 5 // TCP cubic send side congestion algorithm, emulates the behavior of |
6 // TCP cubic. | 6 // TCP cubic. |
7 | 7 |
8 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ | 8 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ |
9 #define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ | 9 #define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 namespace test { | 27 namespace test { |
28 class TcpCubicSenderPeer; | 28 class TcpCubicSenderPeer; |
29 } // namespace test | 29 } // namespace test |
30 | 30 |
31 class NET_EXPORT_PRIVATE TcpCubicSender : public SendAlgorithmInterface { | 31 class NET_EXPORT_PRIVATE TcpCubicSender : public SendAlgorithmInterface { |
32 public: | 32 public: |
33 // Reno option and max_tcp_congestion_window are provided for testing. | 33 // Reno option and max_tcp_congestion_window are provided for testing. |
34 TcpCubicSender(const QuicClock* clock, | 34 TcpCubicSender(const QuicClock* clock, |
35 const RttStats* rtt_stats, | 35 const RttStats* rtt_stats, |
36 bool reno, | 36 bool reno, |
| 37 QuicPacketCount initial_tcp_congestion_window, |
37 QuicPacketCount max_tcp_congestion_window, | 38 QuicPacketCount max_tcp_congestion_window, |
38 QuicConnectionStats* stats); | 39 QuicConnectionStats* stats); |
39 ~TcpCubicSender() override; | 40 ~TcpCubicSender() override; |
40 | 41 |
41 // Start implementation of SendAlgorithmInterface. | 42 // Start implementation of SendAlgorithmInterface. |
42 void SetFromConfig(const QuicConfig& config, bool is_server) override; | 43 void SetFromConfig(const QuicConfig& config, |
| 44 bool is_server, |
| 45 bool using_pacing) override; |
43 void SetNumEmulatedConnections(int num_connections) override; | 46 void SetNumEmulatedConnections(int num_connections) override; |
44 void OnCongestionEvent(bool rtt_updated, | 47 void OnCongestionEvent(bool rtt_updated, |
45 QuicByteCount bytes_in_flight, | 48 QuicByteCount bytes_in_flight, |
46 const CongestionVector& acked_packets, | 49 const CongestionVector& acked_packets, |
47 const CongestionVector& lost_packets) override; | 50 const CongestionVector& lost_packets) override; |
48 bool OnPacketSent(QuicTime sent_time, | 51 bool OnPacketSent(QuicTime sent_time, |
49 QuicByteCount bytes_in_flight, | 52 QuicByteCount bytes_in_flight, |
50 QuicPacketSequenceNumber sequence_number, | 53 QuicPacketSequenceNumber sequence_number, |
51 QuicByteCount bytes, | 54 QuicByteCount bytes, |
52 HasRetransmittableData is_retransmittable) override; | 55 HasRetransmittableData is_retransmittable) override; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 129 |
127 // Maximum number of outstanding packets for tcp. | 130 // Maximum number of outstanding packets for tcp. |
128 QuicPacketCount max_tcp_congestion_window_; | 131 QuicPacketCount max_tcp_congestion_window_; |
129 | 132 |
130 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender); | 133 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender); |
131 }; | 134 }; |
132 | 135 |
133 } // namespace net | 136 } // namespace net |
134 | 137 |
135 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ | 138 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ |
OLD | NEW |