| 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> |
| 11 #include <map> | 11 #include <map> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "net/base/net_export.h" | 14 #include "net/base/net_export.h" |
| 15 #include "net/quic/crypto/cached_network_parameters.h" |
| 15 #include "net/quic/quic_bandwidth.h" | 16 #include "net/quic/quic_bandwidth.h" |
| 16 #include "net/quic/quic_clock.h" | 17 #include "net/quic/quic_clock.h" |
| 17 #include "net/quic/quic_config.h" | 18 #include "net/quic/quic_config.h" |
| 18 #include "net/quic/quic_connection_stats.h" | 19 #include "net/quic/quic_connection_stats.h" |
| 19 #include "net/quic/quic_protocol.h" | 20 #include "net/quic/quic_protocol.h" |
| 20 #include "net/quic/quic_time.h" | 21 #include "net/quic/quic_time.h" |
| 21 | 22 |
| 22 namespace net { | 23 namespace net { |
| 23 | 24 |
| 24 class RttStats; | 25 class RttStats; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 107 |
| 107 // Whether the send algorithm is currently in recovery. | 108 // Whether the send algorithm is currently in recovery. |
| 108 virtual bool InRecovery() const = 0; | 109 virtual bool InRecovery() const = 0; |
| 109 | 110 |
| 110 // Returns the size of the slow start congestion window in bytes, | 111 // Returns the size of the slow start congestion window in bytes, |
| 111 // aka ssthresh. Some send algorithms do not define a slow start | 112 // aka ssthresh. Some send algorithms do not define a slow start |
| 112 // threshold and will return 0. | 113 // threshold and will return 0. |
| 113 virtual QuicByteCount GetSlowStartThreshold() const = 0; | 114 virtual QuicByteCount GetSlowStartThreshold() const = 0; |
| 114 | 115 |
| 115 virtual CongestionControlType GetCongestionControlType() const = 0; | 116 virtual CongestionControlType GetCongestionControlType() const = 0; |
| 117 |
| 118 // Called by the Session when we get a bandwidth estimate from the client. |
| 119 virtual void ResumeConnectionState( |
| 120 const CachedNetworkParameters& cached_network_params) = 0; |
| 116 }; | 121 }; |
| 117 | 122 |
| 118 } // namespace net | 123 } // namespace net |
| 119 | 124 |
| 120 #endif // NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ | 125 #endif // NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ |
| OLD | NEW |