| 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 // Fix rate send side congestion control, used for testing. | 5 // Fix rate send side congestion control, used for testing. |
| 6 | 6 |
| 7 #ifndef NET_QUIC_CONGESTION_CONTROL_FIX_RATE_SENDER_H_ | 7 #ifndef NET_QUIC_CONGESTION_CONTROL_FIX_RATE_SENDER_H_ |
| 8 #define NET_QUIC_CONGESTION_CONTROL_FIX_RATE_SENDER_H_ | 8 #define NET_QUIC_CONGESTION_CONTROL_FIX_RATE_SENDER_H_ |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 QuicPacketSequenceNumber sequence_number, | 40 QuicPacketSequenceNumber sequence_number, |
| 41 QuicByteCount bytes, | 41 QuicByteCount bytes, |
| 42 HasRetransmittableData has_retransmittable_data) OVERRIDE; | 42 HasRetransmittableData has_retransmittable_data) OVERRIDE; |
| 43 virtual void OnRetransmissionTimeout(bool packets_retransmitted) OVERRIDE; | 43 virtual void OnRetransmissionTimeout(bool packets_retransmitted) OVERRIDE; |
| 44 virtual void RevertRetransmissionTimeout() OVERRIDE; | 44 virtual void RevertRetransmissionTimeout() OVERRIDE; |
| 45 virtual QuicTime::Delta TimeUntilSend( | 45 virtual QuicTime::Delta TimeUntilSend( |
| 46 QuicTime now, | 46 QuicTime now, |
| 47 QuicByteCount bytes_in_flight, | 47 QuicByteCount bytes_in_flight, |
| 48 HasRetransmittableData has_retransmittable_data) const OVERRIDE; | 48 HasRetransmittableData has_retransmittable_data) const OVERRIDE; |
| 49 virtual QuicBandwidth BandwidthEstimate() const OVERRIDE; | 49 virtual QuicBandwidth BandwidthEstimate() const OVERRIDE; |
| 50 virtual bool HasReliableBandwidthEstimate() const OVERRIDE; |
| 50 virtual QuicTime::Delta RetransmissionDelay() const OVERRIDE; | 51 virtual QuicTime::Delta RetransmissionDelay() const OVERRIDE; |
| 51 virtual QuicByteCount GetCongestionWindow() const OVERRIDE; | 52 virtual QuicByteCount GetCongestionWindow() const OVERRIDE; |
| 52 // End implementation of SendAlgorithmInterface. | 53 // End implementation of SendAlgorithmInterface. |
| 53 | 54 |
| 54 private: | 55 private: |
| 55 QuicByteCount CongestionWindow() const; | 56 QuicByteCount CongestionWindow() const; |
| 56 | 57 |
| 57 const RttStats* rtt_stats_; | 58 const RttStats* rtt_stats_; |
| 58 QuicBandwidth bitrate_; | 59 QuicBandwidth bitrate_; |
| 59 QuicByteCount max_segment_size_; | 60 QuicByteCount max_segment_size_; |
| 60 LeakyBucket fix_rate_leaky_bucket_; | 61 LeakyBucket fix_rate_leaky_bucket_; |
| 61 QuicTime::Delta latest_rtt_; | 62 QuicTime::Delta latest_rtt_; |
| 62 | 63 |
| 63 DISALLOW_COPY_AND_ASSIGN(FixRateSender); | 64 DISALLOW_COPY_AND_ASSIGN(FixRateSender); |
| 64 }; | 65 }; |
| 65 | 66 |
| 66 } // namespace net | 67 } // namespace net |
| 67 | 68 |
| 68 #endif // NET_QUIC_CONGESTION_CONTROL_FIX_RATE_SENDER_H_ | 69 #endif // NET_QUIC_CONGESTION_CONTROL_FIX_RATE_SENDER_H_ |
| OLD | NEW |