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

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

Issue 1009543004: Create a Perspective enum to use instead of a bool is_server to improve (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added NET_EXPORT_PRIVATE to fix compiler error Created 5 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
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 21 matching lines...) Expand all
32 32
33 static SendAlgorithmInterface* Create( 33 static SendAlgorithmInterface* Create(
34 const QuicClock* clock, 34 const QuicClock* clock,
35 const RttStats* rtt_stats, 35 const RttStats* rtt_stats,
36 CongestionControlType type, 36 CongestionControlType type,
37 QuicConnectionStats* stats, 37 QuicConnectionStats* stats,
38 QuicPacketCount initial_congestion_window); 38 QuicPacketCount initial_congestion_window);
39 39
40 virtual ~SendAlgorithmInterface() {} 40 virtual ~SendAlgorithmInterface() {}
41 41
42 virtual void SetFromConfig( 42 virtual void SetFromConfig(const QuicConfig& config,
43 const QuicConfig& config, bool is_server, bool using_pacing) = 0; 43 Perspective perspective,
44 bool using_pacing) = 0;
44 45
45 // Sets the number of connections to emulate when doing congestion control, 46 // Sets the number of connections to emulate when doing congestion control,
46 // particularly for congestion avoidance. Can be set any time. 47 // particularly for congestion avoidance. Can be set any time.
47 virtual void SetNumEmulatedConnections(int num_connections) = 0; 48 virtual void SetNumEmulatedConnections(int num_connections) = 0;
48 49
49 // Indicates an update to the congestion state, caused either by an incoming 50 // Indicates an update to the congestion state, caused either by an incoming
50 // ack or loss event timeout. |rtt_updated| indicates whether a new 51 // ack or loss event timeout. |rtt_updated| indicates whether a new
51 // latest_rtt sample has been taken, |byte_in_flight| the bytes in flight 52 // latest_rtt sample has been taken, |byte_in_flight| the bytes in flight
52 // prior to the congestion event. |acked_packets| and |lost_packets| are 53 // prior to the congestion event. |acked_packets| and |lost_packets| are
53 // any packets considered acked or lost as a result of the congestion event. 54 // any packets considered acked or lost as a result of the congestion event.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 115
115 // Called by the Session when we get a bandwidth estimate from the client. 116 // Called by the Session when we get a bandwidth estimate from the client.
116 // Returns true if initial connection state is changed as a result. 117 // Returns true if initial connection state is changed as a result.
117 virtual bool ResumeConnectionState( 118 virtual bool ResumeConnectionState(
118 const CachedNetworkParameters& cached_network_params) = 0; 119 const CachedNetworkParameters& cached_network_params) = 0;
119 }; 120 };
120 121
121 } // namespace net 122 } // namespace net
122 123
123 #endif // NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ 124 #endif // NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_
OLDNEW
« no previous file with comments | « net/quic/congestion_control/pacing_sender.cc ('k') | net/quic/congestion_control/tcp_cubic_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698