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 // The pure virtual class for send side congestion control algorithm. | 5 // The pure virtual class for send side congestion control algorithm. |
6 | 6 |
7 #ifndef NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ | 7 #ifndef NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ |
8 #define NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ | 8 #define NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 22 matching lines...) Expand all Loading... |
33 static SendAlgorithmInterface* Create( | 33 static SendAlgorithmInterface* Create( |
34 const QuicClock* clock, | 34 const QuicClock* clock, |
35 const RttStats* rtt_stats, | 35 const RttStats* rtt_stats, |
36 CongestionControlType type, | 36 CongestionControlType type, |
37 QuicConnectionStats* stats, | 37 QuicConnectionStats* stats, |
38 QuicPacketCount initial_congestion_window); | 38 QuicPacketCount initial_congestion_window); |
39 | 39 |
40 virtual ~SendAlgorithmInterface() {} | 40 virtual ~SendAlgorithmInterface() {} |
41 | 41 |
42 virtual void SetFromConfig(const QuicConfig& config, | 42 virtual void SetFromConfig(const QuicConfig& config, |
43 Perspective perspective, | 43 Perspective perspective) = 0; |
44 bool using_pacing) = 0; | |
45 | 44 |
46 // Sets the number of connections to emulate when doing congestion control, | 45 // Sets the number of connections to emulate when doing congestion control, |
47 // particularly for congestion avoidance. Can be set any time. | 46 // particularly for congestion avoidance. Can be set any time. |
48 virtual void SetNumEmulatedConnections(int num_connections) = 0; | 47 virtual void SetNumEmulatedConnections(int num_connections) = 0; |
49 | 48 |
50 // Sets the maximum congestion window in bytes. | 49 // Sets the maximum congestion window in bytes. |
51 virtual void SetMaxCongestionWindow(QuicByteCount max_congestion_window) = 0; | 50 virtual void SetMaxCongestionWindow(QuicByteCount max_congestion_window) = 0; |
52 | 51 |
53 // Indicates an update to the congestion state, caused either by an incoming | 52 // Indicates an update to the congestion state, caused either by an incoming |
54 // ack or loss event timeout. |rtt_updated| indicates whether a new | 53 // ack or loss event timeout. |rtt_updated| indicates whether a new |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // Uses the max bandwidth in the params if |max_bandwidth_resumption| is true. | 119 // Uses the max bandwidth in the params if |max_bandwidth_resumption| is true. |
121 // Returns true if initial connection state is changed as a result. | 120 // Returns true if initial connection state is changed as a result. |
122 virtual bool ResumeConnectionState( | 121 virtual bool ResumeConnectionState( |
123 const CachedNetworkParameters& cached_network_params, | 122 const CachedNetworkParameters& cached_network_params, |
124 bool max_bandwidth_resumption) = 0; | 123 bool max_bandwidth_resumption) = 0; |
125 }; | 124 }; |
126 | 125 |
127 } // namespace net | 126 } // namespace net |
128 | 127 |
129 #endif // NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ | 128 #endif // NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ |
OLD | NEW |