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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // Get the send algorithm specific retransmission delay, called RTO in TCP, | 86 // Get the send algorithm specific retransmission delay, called RTO in TCP, |
87 // Note 1: the caller is responsible for sanity checking this value. | 87 // Note 1: the caller is responsible for sanity checking this value. |
88 // Note 2: this will return zero if we don't have enough data for an estimate. | 88 // Note 2: this will return zero if we don't have enough data for an estimate. |
89 virtual QuicTime::Delta RetransmissionDelay() const = 0; | 89 virtual QuicTime::Delta RetransmissionDelay() const = 0; |
90 | 90 |
91 // Returns the size of the current congestion window in bytes. Note, this is | 91 // Returns the size of the current congestion window in bytes. Note, this is |
92 // not the *available* window. Some send algorithms may not use a congestion | 92 // not the *available* window. Some send algorithms may not use a congestion |
93 // window and will return 0. | 93 // window and will return 0. |
94 virtual QuicByteCount GetCongestionWindow() const = 0; | 94 virtual QuicByteCount GetCongestionWindow() const = 0; |
95 | 95 |
| 96 // Whether the send algorithm is currently in slow start. When true, the |
| 97 // BandwidthEstimate is expected to be too low. |
| 98 virtual bool InSlowStart() const = 0; |
| 99 |
96 // Returns the size of the slow start congestion window in bytes, | 100 // Returns the size of the slow start congestion window in bytes, |
97 // aka ssthresh. Some send algorithms do not define a slow start | 101 // aka ssthresh. Some send algorithms do not define a slow start |
98 // threshold and will return 0. | 102 // threshold and will return 0. |
99 virtual QuicByteCount GetSlowStartThreshold() const = 0; | 103 virtual QuicByteCount GetSlowStartThreshold() const = 0; |
100 }; | 104 }; |
101 | 105 |
102 } // namespace net | 106 } // namespace net |
103 | 107 |
104 #endif // NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ | 108 #endif // NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ |
OLD | NEW |