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

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

Issue 185053006: Refactor of QUIC's rtt storage and calculation to have a single RttStats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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 which adds pacing on top of an another send algorithm. 5 // A send algorithm which adds pacing on top of an another send algorithm.
6 // It uses the underlying sender's bandwidth estimate to determine the 6 // It uses the underlying sender's bandwidth estimate to determine the
7 // pacing rate to be used. It also takes into consideration the expected 7 // pacing rate to be used. It also takes into consideration the expected
8 // resolution of the underlying alarm mechanism to ensure that alarms are 8 // resolution of the underlying alarm mechanism to ensure that alarms are
9 // not set too aggressively, and to smooth out variations. 9 // not set too aggressively, and to smooth out variations.
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 virtual void OnRetransmissionTimeout(bool packets_retransmitted) OVERRIDE; 46 virtual void OnRetransmissionTimeout(bool packets_retransmitted) OVERRIDE;
47 virtual void OnPacketAbandoned(QuicPacketSequenceNumber sequence_number, 47 virtual void OnPacketAbandoned(QuicPacketSequenceNumber sequence_number,
48 QuicByteCount abandoned_bytes) OVERRIDE; 48 QuicByteCount abandoned_bytes) OVERRIDE;
49 virtual QuicTime::Delta TimeUntilSend( 49 virtual QuicTime::Delta TimeUntilSend(
50 QuicTime now, 50 QuicTime now,
51 TransmissionType transmission_type, 51 TransmissionType transmission_type,
52 HasRetransmittableData has_retransmittable_data, 52 HasRetransmittableData has_retransmittable_data,
53 IsHandshake handshake) OVERRIDE; 53 IsHandshake handshake) OVERRIDE;
54 virtual QuicBandwidth BandwidthEstimate() const OVERRIDE; 54 virtual QuicBandwidth BandwidthEstimate() const OVERRIDE;
55 virtual void UpdateRtt(QuicTime::Delta rtt_sample) OVERRIDE; 55 virtual void UpdateRtt(QuicTime::Delta rtt_sample) OVERRIDE;
56 virtual QuicTime::Delta SmoothedRtt() const OVERRIDE;
57 virtual QuicTime::Delta RetransmissionDelay() const OVERRIDE; 56 virtual QuicTime::Delta RetransmissionDelay() const OVERRIDE;
58 virtual QuicByteCount GetCongestionWindow() const OVERRIDE; 57 virtual QuicByteCount GetCongestionWindow() const OVERRIDE;
59 58
60 private: 59 private:
61 scoped_ptr<SendAlgorithmInterface> sender_; // Underlying sender. 60 scoped_ptr<SendAlgorithmInterface> sender_; // Underlying sender.
62 QuicTime::Delta alarm_granularity_; 61 QuicTime::Delta alarm_granularity_;
63 QuicTime next_packet_send_time_; // When can the next packet be sent. 62 QuicTime next_packet_send_time_; // When can the next packet be sent.
64 bool was_last_send_delayed_; // True when the last send was delayed. 63 bool was_last_send_delayed_; // True when the last send was delayed.
65 bool updated_rtt_; // True if we have at least one RTT update. 64 bool updated_rtt_; // True if we have at least one RTT update.
66 65
67 DISALLOW_COPY_AND_ASSIGN(PacingSender); 66 DISALLOW_COPY_AND_ASSIGN(PacingSender);
68 }; 67 };
69 68
70 } // namespace net 69 } // namespace net
71 70
72 #endif // NET_QUIC_CONGESTION_CONTROL_PACING_SENDER_H_ 71 #endif // NET_QUIC_CONGESTION_CONTROL_PACING_SENDER_H_
OLDNEW
« no previous file with comments | « net/quic/congestion_control/loss_detection_interface.h ('k') | net/quic/congestion_control/pacing_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698