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
3 // found in the LICENSE file.
5 // TCP receiver side congestion algorithm, emulates the behaviour of TCP.
7 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_RECEIVER_H_
8 #define NET_QUIC_CONGESTION_CONTROL_TCP_RECEIVER_H_
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "net/base/net_export.h"
13 #include "net/quic/congestion_control/receive_algorithm_interface.h"
14 #include "net/quic/quic_clock.h"
15 #include "net/quic/quic_protocol.h"
19 class NET_EXPORT_PRIVATE TcpReceiver : public ReceiveAlgorithmInterface {
23 // Size of the (currently fixed) receive window.
24 static const QuicByteCount kReceiveWindowTCP;
26 // Start implementation of SendAlgorithmInterface.
27 virtual bool GenerateCongestionFeedback(
28 QuicCongestionFeedbackFrame* feedback) OVERRIDE;
30 virtual void RecordIncomingPacket(QuicByteCount bytes,
31 QuicPacketSequenceNumber sequence_number,
33 bool revived) OVERRIDE;
36 // We need to keep track of FEC recovered packets.
37 int accumulated_number_of_recoverd_lost_packets_;
38 QuicByteCount receive_window_;
40 DISALLOW_COPY_AND_ASSIGN(TcpReceiver);
44 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_RECEIVER_H_