OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 5 #ifndef NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
6 #define NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 6 #define NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 // Returns the current delay for the retransmission timer, which may send | 158 // Returns the current delay for the retransmission timer, which may send |
159 // either a tail loss probe or do a full RTO. Returns QuicTime::Zero() if | 159 // either a tail loss probe or do a full RTO. Returns QuicTime::Zero() if |
160 // there are no retransmittable packets. | 160 // there are no retransmittable packets. |
161 const QuicTime GetRetransmissionTime() const; | 161 const QuicTime GetRetransmissionTime() const; |
162 | 162 |
163 const RttStats* GetRttStats() const; | 163 const RttStats* GetRttStats() const; |
164 | 164 |
165 // Returns the estimated bandwidth calculated by the congestion algorithm. | 165 // Returns the estimated bandwidth calculated by the congestion algorithm. |
166 QuicBandwidth BandwidthEstimate() const; | 166 QuicBandwidth BandwidthEstimate() const; |
167 | 167 |
| 168 // Returns true if the current bandwidth estimate is reliable. |
| 169 bool HasReliableBandwidthEstimate() const; |
| 170 |
168 // Returns the size of the current congestion window in bytes. Note, this is | 171 // Returns the size of the current congestion window in bytes. Note, this is |
169 // not the *available* window. Some send algorithms may not use a congestion | 172 // not the *available* window. Some send algorithms may not use a congestion |
170 // window and will return 0. | 173 // window and will return 0. |
171 QuicByteCount GetCongestionWindow() const; | 174 QuicByteCount GetCongestionWindow() const; |
172 | 175 |
173 // Enables pacing if it has not already been enabled, and if | 176 // Enables pacing if it has not already been enabled, and if |
174 // FLAGS_enable_quic_pacing is set. | 177 // FLAGS_enable_quic_pacing is set. |
175 void MaybeEnablePacing(); | 178 void MaybeEnablePacing(); |
176 | 179 |
177 bool using_pacing() const { return using_pacing_; } | 180 bool using_pacing() const { return using_pacing_; } |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 // Sets of packets acked and lost as a result of the last congestion event. | 319 // Sets of packets acked and lost as a result of the last congestion event. |
317 SendAlgorithmInterface::CongestionMap packets_acked_; | 320 SendAlgorithmInterface::CongestionMap packets_acked_; |
318 SendAlgorithmInterface::CongestionMap packets_lost_; | 321 SendAlgorithmInterface::CongestionMap packets_lost_; |
319 | 322 |
320 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); | 323 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); |
321 }; | 324 }; |
322 | 325 |
323 } // namespace net | 326 } // namespace net |
324 | 327 |
325 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 328 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
OLD | NEW |