blob: 695ffbbac41a75b562a72c64e5850724f3b62234 [file] [log] [blame]
[email protected]b761c632012-12-07 22:44:251// 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.
4//
5// TCP receiver side congestion algorithm, emulates the behaviour of TCP.
6
7#ifndef NET_QUIC_CONGESTION_CONTROL_TCP_RECEIVER_H_
8#define NET_QUIC_CONGESTION_CONTROL_TCP_RECEIVER_H_
9
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"
16
17namespace net {
18
19class NET_EXPORT_PRIVATE TcpReceiver : public ReceiveAlgorithmInterface {
20 public:
21 TcpReceiver();
22
23 // Start implementation of SendAlgorithmInterface.
[email protected]26f3f8e2012-12-13 21:07:1924 virtual bool GenerateCongestionFeedback(
25 QuicCongestionFeedbackFrame* feedback) OVERRIDE;
[email protected]b761c632012-12-07 22:44:2526
[email protected]fee17f72013-02-03 07:47:4127 virtual void RecordIncomingPacket(QuicByteCount bytes,
[email protected]b761c632012-12-07 22:44:2528 QuicPacketSequenceNumber sequence_number,
29 QuicTime timestamp,
30 bool revived) OVERRIDE;
31
32 private:
33 // We need to keep track of FEC recovered packets.
34 int accumulated_number_of_recoverd_lost_packets_;
[email protected]fee17f72013-02-03 07:47:4135 QuicByteCount receive_window_;
36
37 DISALLOW_COPY_AND_ASSIGN(TcpReceiver);
[email protected]b761c632012-12-07 22:44:2538};
39
40} // namespace net
[email protected]b761c632012-12-07 22:44:2541#endif // NET_QUIC_CONGESTION_CONTROL_TCP_RECEIVER_H_