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

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

Issue 2064543002: Add a new rate based sending connection option which uses the pacing rate to keep the bytes_in_flig… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@124273380
Patch Set: Rebase. Created 4 years, 6 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) 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 // The pure virtual class for send side congestion control algorithm. 5 // The pure virtual class for send side congestion control algorithm.
6 6
7 #ifndef NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ 7 #ifndef NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_
8 #define NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ 8 #define NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 // Called when connection migrates and cwnd needs to be reset. 79 // Called when connection migrates and cwnd needs to be reset.
80 virtual void OnConnectionMigration() = 0; 80 virtual void OnConnectionMigration() = 0;
81 81
82 // Calculate the time until we can send the next packet. 82 // Calculate the time until we can send the next packet.
83 virtual QuicTime::Delta TimeUntilSend( 83 virtual QuicTime::Delta TimeUntilSend(
84 QuicTime now, 84 QuicTime now,
85 QuicByteCount bytes_in_flight) const = 0; 85 QuicByteCount bytes_in_flight) const = 0;
86 86
87 // The pacing rate of the send algorithm. May be zero if the rate is unknown. 87 // The pacing rate of the send algorithm. May be zero if the rate is unknown.
88 virtual QuicBandwidth PacingRate() const = 0; 88 virtual QuicBandwidth PacingRate(QuicByteCount bytes_in_flight) const = 0;
89 89
90 // What's the current estimated bandwidth in bytes per second. 90 // What's the current estimated bandwidth in bytes per second.
91 // Returns 0 when it does not have an estimate. 91 // Returns 0 when it does not have an estimate.
92 virtual QuicBandwidth BandwidthEstimate() const = 0; 92 virtual QuicBandwidth BandwidthEstimate() const = 0;
93 93
94 // Get the send algorithm specific retransmission delay, called RTO in TCP, 94 // Get the send algorithm specific retransmission delay, called RTO in TCP,
95 // Note 1: the caller is responsible for sanity checking this value. 95 // Note 1: the caller is responsible for sanity checking this value.
96 // Note 2: this will return zero if we don't have enough data for an estimate. 96 // Note 2: this will return zero if we don't have enough data for an estimate.
97 virtual QuicTime::Delta RetransmissionDelay() const = 0; 97 virtual QuicTime::Delta RetransmissionDelay() const = 0;
98 98
(...skipping 19 matching lines...) Expand all
118 // Called by the Session when we get a bandwidth estimate from the client. 118 // Called by the Session when we get a bandwidth estimate from the client.
119 // Uses the max bandwidth in the params if |max_bandwidth_resumption| is true. 119 // Uses the max bandwidth in the params if |max_bandwidth_resumption| is true.
120 virtual void ResumeConnectionState( 120 virtual void ResumeConnectionState(
121 const CachedNetworkParameters& cached_network_params, 121 const CachedNetworkParameters& cached_network_params,
122 bool max_bandwidth_resumption) = 0; 122 bool max_bandwidth_resumption) = 0;
123 }; 123 };
124 124
125 } // namespace net 125 } // namespace net
126 126
127 #endif // NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ 127 #endif // NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_
OLDNEW
« no previous file with comments | « net/quic/congestion_control/pacing_sender_test.cc ('k') | net/quic/congestion_control/tcp_cubic_sender_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698