OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef NET_QUIC_CONGESTION_CONTROL_TIME_LOSS_ALGORITHM_H_ | 5 #ifndef NET_QUIC_CONGESTION_CONTROL_TIME_LOSS_ALGORITHM_H_ |
6 #define NET_QUIC_CONGESTION_CONTROL_TIME_LOSS_ALGORITHM_H_ | 6 #define NET_QUIC_CONGESTION_CONTROL_TIME_LOSS_ALGORITHM_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 TimeLossAlgorithm(); | 23 TimeLossAlgorithm(); |
24 virtual ~TimeLossAlgorithm() {} | 24 virtual ~TimeLossAlgorithm() {} |
25 | 25 |
26 // Declares pending packets less than the largest observed lost when it has | 26 // Declares pending packets less than the largest observed lost when it has |
27 // been 1.25 RTT since they were sent. Packets larger than the largest | 27 // been 1.25 RTT since they were sent. Packets larger than the largest |
28 // observed are retransmitted via TLP. | 28 // observed are retransmitted via TLP. |
29 virtual SequenceNumberSet DetectLostPackets( | 29 virtual SequenceNumberSet DetectLostPackets( |
30 const QuicUnackedPacketMap& unacked_packets, | 30 const QuicUnackedPacketMap& unacked_packets, |
31 const QuicTime& time, | 31 const QuicTime& time, |
32 QuicPacketSequenceNumber largest_observed, | 32 QuicPacketSequenceNumber largest_observed, |
33 QuicTime::Delta srtt, | 33 const RttStats& rtt_stats) OVERRIDE; |
34 QuicTime::Delta latest_rtt) OVERRIDE; | |
35 | 34 |
36 // Returns the time the next packet will be lost, or zero if there | 35 // Returns the time the next packet will be lost, or zero if there |
37 // are no nacked pending packets outstanding. | 36 // are no nacked pending packets outstanding. |
38 // TODO(ianswett): Ideally the RTT variance and the RTT would be used to | 37 // TODO(ianswett): Ideally the RTT variance and the RTT would be used to |
39 // determine the time a packet is considered lost. | 38 // determine the time a packet is considered lost. |
40 // TODO(ianswett): Consider using Max(1.25 * srtt, 1.125 * last_rtt). | 39 // TODO(ianswett): Consider using Max(1.25 * srtt, 1.125 * last_rtt). |
41 virtual QuicTime GetLossTimeout() const OVERRIDE; | 40 virtual QuicTime GetLossTimeout() const OVERRIDE; |
42 | 41 |
43 private: | 42 private: |
44 QuicTime loss_detection_timeout_; | 43 QuicTime loss_detection_timeout_; |
45 }; | 44 }; |
46 | 45 |
47 } // namespace net | 46 } // namespace net |
48 | 47 |
49 #endif // NET_QUIC_CONGESTION_CONTROL_TIME_LOSS_ALGORITHM_H_ | 48 #endif // NET_QUIC_CONGESTION_CONTROL_TIME_LOSS_ALGORITHM_H_ |
OLD | NEW |