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

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

Issue 12806002: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor comment fix Created 7 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) 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 class is a helper class to TcpCubicSender. 5 // This class is a helper class to TcpCubicSender.
6 // Slow start is the initial startup phase of TCP, it lasts until first packet 6 // Slow start is the initial startup phase of TCP, it lasts until first packet
7 // loss. This class implements hybrid slow start of the TCP cubic send side 7 // loss. This class implements hybrid slow start of the TCP cubic send side
8 // congestion algorithm. The key feaure of hybrid slow start is that it tries to 8 // congestion algorithm. The key feaure of hybrid slow start is that it tries to
9 // avoid running into the wall too hard during the slow start phase, which 9 // avoid running into the wall too hard during the slow start phase, which
10 // the traditional TCP implementation does. 10 // the traditional TCP implementation does.
(...skipping 28 matching lines...) Expand all
39 39
40 // rtt: it the RTT for this ack packet. 40 // rtt: it the RTT for this ack packet.
41 // delay_min: is the lowest delay (RTT) we have seen during the session. 41 // delay_min: is the lowest delay (RTT) we have seen during the session.
42 void Update(QuicTime::Delta rtt, QuicTime::Delta delay_min); 42 void Update(QuicTime::Delta rtt, QuicTime::Delta delay_min);
43 43
44 // Returns true when we should exit slow start. 44 // Returns true when we should exit slow start.
45 bool Exit(); 45 bool Exit();
46 46
47 bool started() { return started_; } 47 bool started() { return started_; }
48 48
49 QuicTime::Delta SmoothedRtt();
50
49 private: 51 private:
50 const QuicClock* clock_; 52 const QuicClock* clock_;
51 bool started_; 53 bool started_;
52 bool found_ack_train_; 54 bool found_ack_train_;
53 bool found_delay_; 55 bool found_delay_;
54 QuicTime round_start_; // Beginning of each slow start round. 56 QuicTime round_start_; // Beginning of each slow start round.
55 QuicPacketSequenceNumber end_sequence_number_; // End of slow start round. 57 QuicPacketSequenceNumber end_sequence_number_; // End of slow start round.
56 QuicTime last_time_; // Last time when the ACK spacing was close. 58 QuicTime last_time_; // Last time when the ACK spacing was close.
57 uint8 sample_count_; // Number of samples to decide current RTT. 59 uint8 sample_count_; // Number of samples to decide current RTT.
58 QuicTime::Delta current_rtt_; // The minimum rtt of current round. 60 QuicTime::Delta current_rtt_; // The minimum rtt of current round.
59 61
60 DISALLOW_COPY_AND_ASSIGN(HybridSlowStart); 62 DISALLOW_COPY_AND_ASSIGN(HybridSlowStart);
61 }; 63 };
62 64
63 } // namespace net 65 } // namespace net
64 66
65 #endif // NET_QUIC_CONGESTION_CONTROL_HYBRID_SLOW_START_H_ 67 #endif // NET_QUIC_CONGESTION_CONTROL_HYBRID_SLOW_START_H_
OLDNEW
« no previous file with comments | « net/quic/congestion_control/fix_rate_test.cc ('k') | net/quic/congestion_control/hybrid_slow_start.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698