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 behaviour of | 5 // TCP cubic send side congestion algorithm, emulates the behaviour 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 24 matching lines...) Expand all Loading... |
35 QuicTime feedback_receive_time, | 35 QuicTime feedback_receive_time, |
36 QuicBandwidth sent_bandwidth, | 36 QuicBandwidth sent_bandwidth, |
37 const SentPacketsMap& sent_packets) OVERRIDE; | 37 const SentPacketsMap& sent_packets) OVERRIDE; |
38 virtual void OnIncomingAck(QuicPacketSequenceNumber acked_sequence_number, | 38 virtual void OnIncomingAck(QuicPacketSequenceNumber acked_sequence_number, |
39 QuicByteCount acked_bytes, | 39 QuicByteCount acked_bytes, |
40 QuicTime::Delta rtt) OVERRIDE; | 40 QuicTime::Delta rtt) OVERRIDE; |
41 virtual void OnIncomingLoss(QuicTime ack_receive_time) OVERRIDE; | 41 virtual void OnIncomingLoss(QuicTime ack_receive_time) OVERRIDE; |
42 virtual void SentPacket(QuicTime sent_time, | 42 virtual void SentPacket(QuicTime sent_time, |
43 QuicPacketSequenceNumber sequence_number, | 43 QuicPacketSequenceNumber sequence_number, |
44 QuicByteCount bytes, | 44 QuicByteCount bytes, |
45 bool is_retransmission, | 45 bool is_retransmission) OVERRIDE; |
46 bool has_retransmittable_data) OVERRIDE; | 46 virtual void AbandoningPacket(QuicPacketSequenceNumber sequence_number, |
| 47 QuicByteCount abandoned_bytes) OVERRIDE; |
47 virtual QuicTime::Delta TimeUntilSend(QuicTime now, | 48 virtual QuicTime::Delta TimeUntilSend(QuicTime now, |
48 bool is_retransmission) OVERRIDE; | 49 bool is_retransmission, |
| 50 bool has_retransmittable_data) OVERRIDE; |
49 virtual QuicBandwidth BandwidthEstimate() OVERRIDE; | 51 virtual QuicBandwidth BandwidthEstimate() OVERRIDE; |
| 52 virtual QuicTime::Delta SmoothedRtt() OVERRIDE; |
50 // End implementation of SendAlgorithmInterface. | 53 // End implementation of SendAlgorithmInterface. |
51 | 54 |
52 private: | 55 private: |
53 friend class test::TcpCubicSenderPeer; | 56 friend class test::TcpCubicSenderPeer; |
54 | 57 |
55 QuicByteCount AvailableCongestionWindow(); | 58 QuicByteCount AvailableCongestionWindow(); |
56 QuicByteCount CongestionWindow(); | 59 QuicByteCount CongestionWindow(); |
57 void Reset(); | 60 void Reset(); |
58 void AckAccounting(QuicTime::Delta rtt); | 61 void AckAccounting(QuicTime::Delta rtt); |
59 void CongestionAvoidance(QuicPacketSequenceNumber ack); | 62 void CongestionAvoidance(QuicPacketSequenceNumber ack); |
(...skipping 30 matching lines...) Expand all Loading... |
90 | 93 |
91 // Min RTT during this session. | 94 // Min RTT during this session. |
92 QuicTime::Delta delay_min_; | 95 QuicTime::Delta delay_min_; |
93 | 96 |
94 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender); | 97 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender); |
95 }; | 98 }; |
96 | 99 |
97 } // namespace net | 100 } // namespace net |
98 | 101 |
99 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ | 102 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ |
OLD | NEW |