| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 virtual void OnPacketAbandoned(QuicPacketSequenceNumber sequence_number, | 53 virtual void OnPacketAbandoned(QuicPacketSequenceNumber sequence_number, |
| 54 QuicByteCount abandoned_bytes) OVERRIDE; | 54 QuicByteCount abandoned_bytes) OVERRIDE; |
| 55 virtual QuicTime::Delta TimeUntilSend( | 55 virtual QuicTime::Delta TimeUntilSend( |
| 56 QuicTime now, | 56 QuicTime now, |
| 57 TransmissionType transmission_type, | 57 TransmissionType transmission_type, |
| 58 HasRetransmittableData has_retransmittable_data, | 58 HasRetransmittableData has_retransmittable_data, |
| 59 IsHandshake handshake) OVERRIDE; | 59 IsHandshake handshake) OVERRIDE; |
| 60 virtual QuicBandwidth BandwidthEstimate() OVERRIDE; | 60 virtual QuicBandwidth BandwidthEstimate() OVERRIDE; |
| 61 virtual QuicTime::Delta SmoothedRtt() OVERRIDE; | 61 virtual QuicTime::Delta SmoothedRtt() OVERRIDE; |
| 62 virtual QuicTime::Delta RetransmissionDelay() OVERRIDE; | 62 virtual QuicTime::Delta RetransmissionDelay() OVERRIDE; |
| 63 virtual QuicByteCount GetCongestionWindow() OVERRIDE; |
| 64 virtual void SetCongestionWindow(QuicByteCount window) OVERRIDE; |
| 63 // End implementation of SendAlgorithmInterface. | 65 // End implementation of SendAlgorithmInterface. |
| 64 | 66 |
| 65 private: | 67 private: |
| 66 friend class test::TcpCubicSenderPeer; | 68 friend class test::TcpCubicSenderPeer; |
| 67 | 69 |
| 68 QuicByteCount AvailableSendWindow(); | 70 QuicByteCount AvailableSendWindow(); |
| 69 QuicByteCount SendWindow(); | 71 QuicByteCount SendWindow(); |
| 70 void Reset(); | 72 void Reset(); |
| 71 void AckAccounting(QuicTime::Delta rtt); | 73 void AckAccounting(QuicTime::Delta rtt); |
| 72 void CongestionAvoidance(QuicPacketSequenceNumber ack); | 74 void CongestionAvoidance(QuicPacketSequenceNumber ack); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // Approximation of standard deviation, the error is roughly 1.25 times | 116 // Approximation of standard deviation, the error is roughly 1.25 times |
| 115 // larger than the standard deviation, for a normally distributed signal. | 117 // larger than the standard deviation, for a normally distributed signal. |
| 116 QuicTime::Delta mean_deviation_; | 118 QuicTime::Delta mean_deviation_; |
| 117 | 119 |
| 118 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender); | 120 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender); |
| 119 }; | 121 }; |
| 120 | 122 |
| 121 } // namespace net | 123 } // namespace net |
| 122 | 124 |
| 123 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ | 125 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ |
| OLD | NEW |