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