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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 virtual QuicTime::Delta TimeUntilSend( | 56 virtual QuicTime::Delta TimeUntilSend( |
57 QuicTime now, | 57 QuicTime now, |
58 QuicByteCount bytes_in_flight, | 58 QuicByteCount bytes_in_flight, |
59 HasRetransmittableData has_retransmittable_data) const OVERRIDE; | 59 HasRetransmittableData has_retransmittable_data) const OVERRIDE; |
60 virtual QuicBandwidth BandwidthEstimate() const OVERRIDE; | 60 virtual QuicBandwidth BandwidthEstimate() const OVERRIDE; |
61 virtual bool HasReliableBandwidthEstimate() const OVERRIDE; | 61 virtual bool HasReliableBandwidthEstimate() const OVERRIDE; |
62 virtual QuicTime::Delta RetransmissionDelay() const OVERRIDE; | 62 virtual QuicTime::Delta RetransmissionDelay() const OVERRIDE; |
63 virtual QuicByteCount GetCongestionWindow() const OVERRIDE; | 63 virtual QuicByteCount GetCongestionWindow() const OVERRIDE; |
64 virtual bool InSlowStart() const OVERRIDE; | 64 virtual bool InSlowStart() const OVERRIDE; |
65 virtual QuicByteCount GetSlowStartThreshold() const OVERRIDE; | 65 virtual QuicByteCount GetSlowStartThreshold() const OVERRIDE; |
| 66 virtual CongestionControlType GetCongestionControlType() const OVERRIDE; |
66 // End implementation of SendAlgorithmInterface. | 67 // End implementation of SendAlgorithmInterface. |
67 | 68 |
68 private: | 69 private: |
69 friend class test::TcpCubicSenderPeer; | 70 friend class test::TcpCubicSenderPeer; |
70 | 71 |
71 // TODO(ianswett): Remove these and migrate to OnCongestionEvent. | 72 // TODO(ianswett): Remove these and migrate to OnCongestionEvent. |
72 void OnPacketAcked(QuicPacketSequenceNumber acked_sequence_number, | 73 void OnPacketAcked(QuicPacketSequenceNumber acked_sequence_number, |
73 QuicByteCount acked_bytes, | 74 QuicByteCount acked_bytes, |
74 QuicByteCount bytes_in_flight); | 75 QuicByteCount bytes_in_flight); |
75 void OnPacketLost(QuicPacketSequenceNumber largest_loss, | 76 void OnPacketLost(QuicPacketSequenceNumber largest_loss, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 136 |
136 // Maximum number of outstanding packets for tcp. | 137 // Maximum number of outstanding packets for tcp. |
137 QuicTcpCongestionWindow max_tcp_congestion_window_; | 138 QuicTcpCongestionWindow max_tcp_congestion_window_; |
138 | 139 |
139 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender); | 140 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender); |
140 }; | 141 }; |
141 | 142 |
142 } // namespace net | 143 } // namespace net |
143 | 144 |
144 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ | 145 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ |
OLD | NEW |