| 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 <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 const RttStats* GetRttStats() const; | 175 const RttStats* GetRttStats() const; |
| 176 | 176 |
| 177 // Returns the estimated bandwidth calculated by the congestion algorithm. | 177 // Returns the estimated bandwidth calculated by the congestion algorithm. |
| 178 QuicBandwidth BandwidthEstimate() const; | 178 QuicBandwidth BandwidthEstimate() const; |
| 179 | 179 |
| 180 // Returns true if the current instantaneous bandwidth estimate is reliable. | 180 // Returns true if the current instantaneous bandwidth estimate is reliable. |
| 181 bool HasReliableBandwidthEstimate() const; | 181 bool HasReliableBandwidthEstimate() const; |
| 182 | 182 |
| 183 const QuicSustainedBandwidthRecorder& SustainedBandwidthRecorder() const; | 183 const QuicSustainedBandwidthRecorder& SustainedBandwidthRecorder() const; |
| 184 | 184 |
| 185 // Returns the size of the current congestion window in bytes. Note, this is | 185 // Returns the size of the current congestion window in number of |
| 186 // not the *available* window. Some send algorithms may not use a congestion | 186 // kDefaultTCPMSS-sized segments. Note, this is not the *available* window. |
| 187 // window and will return 0. | 187 // Some send algorithms may not use a congestion window and will return 0. |
| 188 QuicByteCount GetCongestionWindow() const; | 188 QuicPacketCount GetCongestionWindowInTcpMss() const; |
| 189 | 189 |
| 190 // Returns the size of the slow start congestion window in bytes, | 190 // Returns the number of packets of length |max_packet_length| which fit in |
| 191 // aka ssthresh. Some send algorithms do not define a slow start | 191 // the current congestion window. More packets may end up in flight if the |
| 192 // threshold and will return 0. | 192 // congestion window has been recently reduced, of if non-full packets are |
| 193 QuicByteCount GetSlowStartThreshold() const; | 193 // sent. |
| 194 QuicPacketCount EstimateMaxPacketsInFlight( |
| 195 QuicByteCount max_packet_length) const; |
| 196 |
| 197 // Returns the size of the slow start congestion window in nume of 1460 byte |
| 198 // TCP segments, aka ssthresh. Some send algorithms do not define a slow |
| 199 // start threshold and will return 0. |
| 200 QuicPacketCount GetSlowStartThresholdInTcpMss() const; |
| 194 | 201 |
| 195 // Enables pacing if it has not already been enabled. | 202 // Enables pacing if it has not already been enabled. |
| 196 void EnablePacing(); | 203 void EnablePacing(); |
| 197 | 204 |
| 198 bool using_pacing() const { return using_pacing_; } | 205 bool using_pacing() const { return using_pacing_; } |
| 199 | 206 |
| 200 void set_debug_delegate(DebugDelegate* debug_delegate) { | 207 void set_debug_delegate(DebugDelegate* debug_delegate) { |
| 201 debug_delegate_ = debug_delegate; | 208 debug_delegate_ = debug_delegate; |
| 202 } | 209 } |
| 203 | 210 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 // Records bandwidth from server to client in normal operation, over periods | 390 // Records bandwidth from server to client in normal operation, over periods |
| 384 // of time with no loss events. | 391 // of time with no loss events. |
| 385 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_; | 392 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_; |
| 386 | 393 |
| 387 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); | 394 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); |
| 388 }; | 395 }; |
| 389 | 396 |
| 390 } // namespace net | 397 } // namespace net |
| 391 | 398 |
| 392 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 399 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
| OLD | NEW |