| 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 26 matching lines...) Expand all Loading... |
| 37 QuicByteCount bytes, | 37 QuicByteCount bytes, |
| 38 Retransmission is_retransmission) OVERRIDE; | 38 Retransmission is_retransmission) OVERRIDE; |
| 39 virtual void AbandoningPacket(QuicPacketSequenceNumber sequence_number, | 39 virtual void AbandoningPacket(QuicPacketSequenceNumber sequence_number, |
| 40 QuicByteCount abandoned_bytes) OVERRIDE; | 40 QuicByteCount abandoned_bytes) OVERRIDE; |
| 41 virtual QuicTime::Delta TimeUntilSend( | 41 virtual QuicTime::Delta TimeUntilSend( |
| 42 QuicTime now, | 42 QuicTime now, |
| 43 Retransmission is_retransmission, | 43 Retransmission is_retransmission, |
| 44 HasRetransmittableData has_retransmittable_data) OVERRIDE; | 44 HasRetransmittableData has_retransmittable_data) OVERRIDE; |
| 45 virtual QuicBandwidth BandwidthEstimate() OVERRIDE; | 45 virtual QuicBandwidth BandwidthEstimate() OVERRIDE; |
| 46 virtual QuicTime::Delta SmoothedRtt() OVERRIDE; | 46 virtual QuicTime::Delta SmoothedRtt() OVERRIDE; |
| 47 virtual QuicTime::Delta RetransmissionDelay() OVERRIDE; |
| 47 // End implementation of SendAlgorithmInterface. | 48 // End implementation of SendAlgorithmInterface. |
| 48 | 49 |
| 49 private: | 50 private: |
| 50 QuicByteCount CongestionWindow(); | 51 QuicByteCount CongestionWindow(); |
| 51 | 52 |
| 52 QuicBandwidth bitrate_; | 53 QuicBandwidth bitrate_; |
| 53 LeakyBucket fix_rate_leaky_bucket_; | 54 LeakyBucket fix_rate_leaky_bucket_; |
| 54 PacedSender paced_sender_; | 55 PacedSender paced_sender_; |
| 55 QuicByteCount data_in_flight_; | 56 QuicByteCount data_in_flight_; |
| 56 QuicTime::Delta latest_rtt_; | 57 QuicTime::Delta latest_rtt_; |
| 57 | 58 |
| 58 DISALLOW_COPY_AND_ASSIGN(FixRateSender); | 59 DISALLOW_COPY_AND_ASSIGN(FixRateSender); |
| 59 }; | 60 }; |
| 60 | 61 |
| 61 } // namespace net | 62 } // namespace net |
| 62 | 63 |
| 63 #endif // NET_QUIC_CONGESTION_CONTROL_FIX_RATE_SENDER_H_ | 64 #endif // NET_QUIC_CONGESTION_CONTROL_FIX_RATE_SENDER_H_ |
| OLD | NEW |