Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Side by Side Diff: net/quic/core/congestion_control/pacing_sender.h

Issue 2808273006: Landing Recent QUIC changes until Sun Apr 9 16:12:55 (Closed)
Patch Set: increment enabled_options in e2e test Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 // A send algorithm that adds pacing on top of an another send algorithm. 5 // A send algorithm that adds pacing on top of an another send algorithm.
6 // It uses the underlying sender's pacing rate to schedule packets. 6 // It uses the underlying sender's pacing rate to schedule packets.
7 // It also takes into consideration the expected granularity of the underlying 7 // It also takes into consideration the expected granularity of the underlying
8 // alarm to ensure that alarms are not set too aggressively, and err towards 8 // alarm to ensure that alarms are not set too aggressively, and err towards
9 // sending packets too early instead of too late. 9 // sending packets too early instead of too late.
10 10
(...skipping 27 matching lines...) Expand all
38 void set_max_pacing_rate(QuicBandwidth max_pacing_rate) { 38 void set_max_pacing_rate(QuicBandwidth max_pacing_rate) {
39 max_pacing_rate_ = max_pacing_rate; 39 max_pacing_rate_ = max_pacing_rate;
40 } 40 }
41 41
42 void OnCongestionEvent( 42 void OnCongestionEvent(
43 bool rtt_updated, 43 bool rtt_updated,
44 QuicByteCount bytes_in_flight, 44 QuicByteCount bytes_in_flight,
45 QuicTime event_time, 45 QuicTime event_time,
46 const SendAlgorithmInterface::CongestionVector& acked_packets, 46 const SendAlgorithmInterface::CongestionVector& acked_packets,
47 const SendAlgorithmInterface::CongestionVector& lost_packets); 47 const SendAlgorithmInterface::CongestionVector& lost_packets);
48
48 bool OnPacketSent(QuicTime sent_time, 49 bool OnPacketSent(QuicTime sent_time,
49 QuicByteCount bytes_in_flight, 50 QuicByteCount bytes_in_flight,
50 QuicPacketNumber packet_number, 51 QuicPacketNumber packet_number,
51 QuicByteCount bytes, 52 QuicByteCount bytes,
52 HasRetransmittableData is_retransmittable); 53 HasRetransmittableData is_retransmittable);
53 QuicTime::Delta TimeUntilSend(QuicTime now, 54
54 QuicByteCount bytes_in_flight) const; 55 QuicTime::Delta TimeUntilSend(QuicTime now, QuicByteCount bytes_in_flight);
56
55 QuicBandwidth PacingRate(QuicByteCount bytes_in_flight) const; 57 QuicBandwidth PacingRate(QuicByteCount bytes_in_flight) const;
56 58
57 private: 59 private:
58 // Underlying sender. Not owned. 60 // Underlying sender. Not owned.
59 SendAlgorithmInterface* sender_; 61 SendAlgorithmInterface* sender_;
60 // If not QuicBandidth::Zero, the maximum rate the PacingSender will use. 62 // If not QuicBandidth::Zero, the maximum rate the PacingSender will use.
61 QuicBandwidth max_pacing_rate_; 63 QuicBandwidth max_pacing_rate_;
62 64
63 // Number of unpaced packets to be sent before packets are delayed. 65 // Number of unpaced packets to be sent before packets are delayed.
64 uint32_t burst_tokens_; 66 uint32_t burst_tokens_;
65 // Send time of the last packet considered delayed. 67 // Send time of the last packet considered delayed.
66 QuicTime last_delayed_packet_sent_time_; 68 QuicTime last_delayed_packet_sent_time_;
67 QuicTime ideal_next_packet_send_time_; // When can the next packet be sent. 69 QuicTime ideal_next_packet_send_time_; // When can the next packet be sent.
68 mutable bool was_last_send_delayed_; // True when the last send was delayed. 70 bool was_last_send_delayed_; // True when the last send was delayed.
69 71
70 DISALLOW_COPY_AND_ASSIGN(PacingSender); 72 DISALLOW_COPY_AND_ASSIGN(PacingSender);
71 }; 73 };
72 74
73 } // namespace net 75 } // namespace net
74 76
75 #endif // NET_QUIC_CORE_CONGESTION_CONTROL_PACING_SENDER_H_ 77 #endif // NET_QUIC_CORE_CONGESTION_CONTROL_PACING_SENDER_H_
OLDNEW
« no previous file with comments | « net/quic/core/congestion_control/general_loss_algorithm_test.cc ('k') | net/quic/core/congestion_control/pacing_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698