Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: net/quic/congestion_control/tcp_loss_algorithm.h

Issue 1660593004: Landing Recent QUIC changes until 01/28/2016 18:41 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0202
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_LOSS_ALGORITHM_H_
6 #define NET_QUIC_CONGESTION_CONTROL_TCP_LOSS_ALGORITHM_H_
7
8 #include <algorithm>
9 #include <map>
10
11 #include "base/macros.h"
12 #include "net/quic/congestion_control/loss_detection_interface.h"
13 #include "net/quic/quic_protocol.h"
14 #include "net/quic/quic_time.h"
15 #include "net/quic/quic_unacked_packet_map.h"
16
17 namespace net {
18
19 // Class which implement's TCP's approach of detecting loss when 3 nacks have
20 // been received for a packet. Also implements TCP's early retransmit(RFC5827).
21 class NET_EXPORT_PRIVATE TCPLossAlgorithm : public LossDetectionInterface {
22 public:
23 // TCP retransmits after 3 nacks.
24 static const QuicPacketCount kNumberOfNacksBeforeRetransmission = 3;
25
26 TCPLossAlgorithm();
27 ~TCPLossAlgorithm() override {}
28
29 LossDetectionType GetLossDetectionType() const override;
30
31 // Uses nack counts to decide when packets are lost.
32 PacketNumberSet DetectLostPackets(const QuicUnackedPacketMap& unacked_packets,
33 const QuicTime& time,
34 QuicPacketNumber largest_observed,
35 const RttStats& rtt_stats) override;
36 // Unsupported.
37 void DetectLosses(
38 const QuicUnackedPacketMap& unacked_packets,
39 const QuicTime& time,
40 const RttStats& rtt_stats,
41 SendAlgorithmInterface::CongestionVector* packets_lost) override;
42
43 // Returns a non-zero value when the early retransmit timer is active.
44 QuicTime GetLossTimeout() const override;
45
46 private:
47 QuicTime loss_detection_timeout_;
48
49 DISALLOW_COPY_AND_ASSIGN(TCPLossAlgorithm);
50 };
51
52 } // namespace net
53
54 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_LOSS_ALGORITHM_H_
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender.cc ('k') | net/quic/congestion_control/tcp_loss_algorithm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698