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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 virtual void OnRetransmissionTimeout(bool packets_retransmitted) OVERRIDE; | 42 virtual void OnRetransmissionTimeout(bool packets_retransmitted) OVERRIDE; |
43 virtual void OnPacketAbandoned(QuicPacketSequenceNumber sequence_number, | 43 virtual void OnPacketAbandoned(QuicPacketSequenceNumber sequence_number, |
44 QuicByteCount abandoned_bytes) OVERRIDE; | 44 QuicByteCount abandoned_bytes) OVERRIDE; |
45 virtual QuicTime::Delta TimeUntilSend( | 45 virtual QuicTime::Delta TimeUntilSend( |
46 QuicTime now, | 46 QuicTime now, |
47 TransmissionType transmission_type, | 47 TransmissionType transmission_type, |
48 HasRetransmittableData has_retransmittable_data, | 48 HasRetransmittableData has_retransmittable_data, |
49 IsHandshake handshake) OVERRIDE; | 49 IsHandshake handshake) OVERRIDE; |
50 virtual QuicBandwidth BandwidthEstimate() const OVERRIDE; | 50 virtual QuicBandwidth BandwidthEstimate() const OVERRIDE; |
51 virtual void UpdateRtt(QuicTime::Delta rtt_sample) OVERRIDE; | 51 virtual void UpdateRtt(QuicTime::Delta rtt_sample) OVERRIDE; |
52 virtual QuicTime::Delta SmoothedRtt() const OVERRIDE; | |
53 virtual QuicTime::Delta RetransmissionDelay() const OVERRIDE; | 52 virtual QuicTime::Delta RetransmissionDelay() const OVERRIDE; |
54 virtual QuicByteCount GetCongestionWindow() const OVERRIDE; | 53 virtual QuicByteCount GetCongestionWindow() const OVERRIDE; |
55 // End implementation of SendAlgorithmInterface. | 54 // End implementation of SendAlgorithmInterface. |
56 | 55 |
57 private: | 56 private: |
58 QuicByteCount CongestionWindow(); | 57 QuicByteCount CongestionWindow(); |
59 | 58 |
60 QuicBandwidth bitrate_; | 59 QuicBandwidth bitrate_; |
61 QuicByteCount max_segment_size_; | 60 QuicByteCount max_segment_size_; |
62 LeakyBucket fix_rate_leaky_bucket_; | 61 LeakyBucket fix_rate_leaky_bucket_; |
63 PacedSender paced_sender_; | 62 PacedSender paced_sender_; |
64 QuicByteCount data_in_flight_; | 63 QuicByteCount data_in_flight_; |
65 QuicTime::Delta latest_rtt_; | 64 QuicTime::Delta latest_rtt_; |
66 | 65 |
67 DISALLOW_COPY_AND_ASSIGN(FixRateSender); | 66 DISALLOW_COPY_AND_ASSIGN(FixRateSender); |
68 }; | 67 }; |
69 | 68 |
70 } // namespace net | 69 } // namespace net |
71 | 70 |
72 #endif // NET_QUIC_CONGESTION_CONTROL_FIX_RATE_SENDER_H_ | 71 #endif // NET_QUIC_CONGESTION_CONTROL_FIX_RATE_SENDER_H_ |
OLD | NEW |