Index: net/quic/congestion_control/tcp_loss_algorithm.h |
diff --git a/net/quic/congestion_control/tcp_loss_algorithm.h b/net/quic/congestion_control/tcp_loss_algorithm.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7c42c9f76afa66add65580b5025dce11dba1e0ab |
--- /dev/null |
+++ b/net/quic/congestion_control/tcp_loss_algorithm.h |
@@ -0,0 +1,36 @@ |
+// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef NET_QUIC_CONGESTION_CONTROL_TCP_LOSS_ALGORITHM_H_ |
+#define NET_QUIC_CONGESTION_CONTROL_TCP_LOSS_ALGORITHM_H_ |
+ |
+#include <algorithm> |
+#include <map> |
+ |
+#include "base/basictypes.h" |
+#include "net/quic/congestion_control/loss_detection_interface.h" |
+#include "net/quic/quic_protocol.h" |
+#include "net/quic/quic_time.h" |
+#include "net/quic/quic_unacked_packet_map.h" |
+ |
+namespace net { |
+ |
+// Class which implement's TCP's approach of detecting loss when 3 nacks have |
+// been received for a packet. Also implements TCP's early retransmit(RFC5827). |
+class NET_EXPORT_PRIVATE TCPLossAlgorithm : public LossDetectionInterface { |
+ public: |
+ TCPLossAlgorithm(); |
+ virtual ~TCPLossAlgorithm() {} |
+ |
+ // Uses nack counts to decide when packets are lost. |
+ virtual SequenceNumberSet DetectLostPackets( |
+ const QuicUnackedPacketMap& unacked_packets, |
+ const QuicTime& time, |
+ QuicPacketSequenceNumber largest_observed, |
+ QuicTime::Delta srtt) OVERRIDE; |
+}; |
+ |
+} // namespace net |
+ |
+#endif // NET_QUIC_CONGESTION_CONTROL_TCP_LOSS_ALGORITHM_H_ |