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

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

Issue 47283002: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compilation error Created 7 years, 1 month 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) 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 // This is the interface from the QuicConnection into the QUIC 5 // This is the interface from the QuicConnection into the QUIC
6 // congestion control code. It wraps the SendAlgorithmInterface and 6 // congestion control code. It wraps the SendAlgorithmInterface and
7 // ReceiveAlgorithmInterface and provides a single interface 7 // ReceiveAlgorithmInterface and provides a single interface
8 // for consumers. 8 // for consumers.
9 9
10 #ifndef NET_QUIC_CONGESTION_CONTROL_QUIC_CONGESTION_MANAGER_H_ 10 #ifndef NET_QUIC_CONGESTION_CONTROL_QUIC_CONGESTION_MANAGER_H_
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 const QuicTime::Delta GetRetransmissionDelay( 88 const QuicTime::Delta GetRetransmissionDelay(
89 size_t unacked_packets_count, 89 size_t unacked_packets_count,
90 size_t number_retransmissions); 90 size_t number_retransmissions);
91 91
92 // Returns the estimated smoothed RTT calculated by the congestion algorithm. 92 // Returns the estimated smoothed RTT calculated by the congestion algorithm.
93 const QuicTime::Delta SmoothedRtt(); 93 const QuicTime::Delta SmoothedRtt();
94 94
95 // Returns the estimated bandwidth calculated by the congestion algorithm. 95 // Returns the estimated bandwidth calculated by the congestion algorithm.
96 QuicBandwidth BandwidthEstimate(); 96 QuicBandwidth BandwidthEstimate();
97 97
98 // Returns the size of the current congestion window. Note, this
99 // is not the *available* window. Some send algorithms may not use a
100 // congestion window and will return 0.
101 QuicByteCount GetCongestionWindow();
102
103 // Sets the value of the current congestion window to |window|.
104 void SetCongestionWindow(QuicByteCount window);
105
98 private: 106 private:
99 friend class test::QuicConnectionPeer; 107 friend class test::QuicConnectionPeer;
100 friend class test::QuicCongestionManagerPeer; 108 friend class test::QuicCongestionManagerPeer;
101 typedef std::map<QuicPacketSequenceNumber, size_t> PendingPacketsMap; 109 typedef std::map<QuicPacketSequenceNumber, size_t> PendingPacketsMap;
102 110
103 // Get the current(last) rtt. Infinite is returned if invalid. 111 // Get the current(last) rtt. Infinite is returned if invalid.
104 const QuicTime::Delta rtt(); 112 const QuicTime::Delta rtt();
105 113
106 void CleanupPacketHistory(); 114 void CleanupPacketHistory();
107 115
108 const QuicClock* clock_; 116 const QuicClock* clock_;
109 scoped_ptr<ReceiveAlgorithmInterface> receive_algorithm_; 117 scoped_ptr<ReceiveAlgorithmInterface> receive_algorithm_;
110 scoped_ptr<SendAlgorithmInterface> send_algorithm_; 118 scoped_ptr<SendAlgorithmInterface> send_algorithm_;
111 SendAlgorithmInterface::SentPacketsMap packet_history_map_; 119 SendAlgorithmInterface::SentPacketsMap packet_history_map_;
112 PendingPacketsMap pending_packets_; 120 PendingPacketsMap pending_packets_;
113 QuicPacketSequenceNumber largest_missing_; 121 QuicPacketSequenceNumber largest_missing_;
114 QuicTime::Delta current_rtt_; 122 QuicTime::Delta current_rtt_;
115 123
116 DISALLOW_COPY_AND_ASSIGN(QuicCongestionManager); 124 DISALLOW_COPY_AND_ASSIGN(QuicCongestionManager);
117 }; 125 };
118 126
119 } // namespace net 127 } // namespace net
120 128
121 #endif // NET_QUIC_CONGESTION_CONTROL_QUIC_CONGESTION_MANAGER_H_ 129 #endif // NET_QUIC_CONGESTION_CONTROL_QUIC_CONGESTION_MANAGER_H_
OLDNEW
« no previous file with comments | « net/quic/congestion_control/inter_arrival_sender.cc ('k') | net/quic/congestion_control/quic_congestion_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698