OLD | NEW |
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 // TCP cubic send side congestion algorithm, emulates the behavior of | 5 // TCP cubic send side congestion algorithm, emulates the behavior of |
6 // TCP cubic. | 6 // TCP cubic. |
7 | 7 |
8 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ | 8 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ |
9 #define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ | 9 #define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 virtual QuicTime::Delta SmoothedRtt() const OVERRIDE; | 64 virtual QuicTime::Delta SmoothedRtt() const OVERRIDE; |
65 virtual QuicTime::Delta RetransmissionDelay() const OVERRIDE; | 65 virtual QuicTime::Delta RetransmissionDelay() const OVERRIDE; |
66 virtual QuicByteCount GetCongestionWindow() const OVERRIDE; | 66 virtual QuicByteCount GetCongestionWindow() const OVERRIDE; |
67 // End implementation of SendAlgorithmInterface. | 67 // End implementation of SendAlgorithmInterface. |
68 | 68 |
69 private: | 69 private: |
70 friend class test::TcpCubicSenderPeer; | 70 friend class test::TcpCubicSenderPeer; |
71 | 71 |
72 QuicByteCount AvailableSendWindow(); | 72 QuicByteCount AvailableSendWindow(); |
73 QuicByteCount SendWindow(); | 73 QuicByteCount SendWindow(); |
74 void Reset(); | |
75 void MaybeIncreaseCwnd(QuicPacketSequenceNumber acked_sequence_number); | 74 void MaybeIncreaseCwnd(QuicPacketSequenceNumber acked_sequence_number); |
76 bool IsCwndLimited() const; | 75 bool IsCwndLimited() const; |
77 bool InRecovery() const; | 76 bool InRecovery() const; |
78 void OnTimeOut(); | |
79 | 77 |
80 HybridSlowStart hybrid_slow_start_; | 78 HybridSlowStart hybrid_slow_start_; |
81 Cubic cubic_; | 79 Cubic cubic_; |
82 | 80 |
83 // Reno provided for testing. | 81 // Reno provided for testing. |
84 const bool reno_; | 82 const bool reno_; |
85 | 83 |
86 // ACK counter for the Reno implementation. | 84 // ACK counter for the Reno implementation. |
87 int64 congestion_window_count_; | 85 int64 congestion_window_count_; |
88 | 86 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // Approximation of standard deviation, the error is roughly 1.25 times | 130 // Approximation of standard deviation, the error is roughly 1.25 times |
133 // larger than the standard deviation, for a normally distributed signal. | 131 // larger than the standard deviation, for a normally distributed signal. |
134 QuicTime::Delta mean_deviation_; | 132 QuicTime::Delta mean_deviation_; |
135 | 133 |
136 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender); | 134 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender); |
137 }; | 135 }; |
138 | 136 |
139 } // namespace net | 137 } // namespace net |
140 | 138 |
141 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ | 139 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ |
OLD | NEW |