[email protected] | b761c63 | 2012-12-07 22:44:25 | [diff] [blame] | 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. | ||||
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 | |||||
17 | namespace net { | ||||
18 | |||||
19 | class NET_EXPORT_PRIVATE TcpReceiver : public ReceiveAlgorithmInterface { | ||||
20 | public: | ||||
21 | TcpReceiver(); | ||||
22 | |||||
[email protected] | cad532e | 2013-10-24 04:43:38 | [diff] [blame] | 23 | // Size of the (currently fixed) receive window. |
24 | static const QuicByteCount kReceiveWindowTCP; | ||||
25 | |||||
[email protected] | b761c63 | 2012-12-07 22:44:25 | [diff] [blame] | 26 | // Start implementation of SendAlgorithmInterface. |
dcheng | b03027d | 2014-10-21 12:00:20 | [diff] [blame^] | 27 | bool GenerateCongestionFeedback( |
mostynb | ba063d603 | 2014-10-09 11:01:13 | [diff] [blame] | 28 | QuicCongestionFeedbackFrame* feedback) override; |
[email protected] | b761c63 | 2012-12-07 22:44:25 | [diff] [blame] | 29 | |
dcheng | b03027d | 2014-10-21 12:00:20 | [diff] [blame^] | 30 | void RecordIncomingPacket(QuicByteCount bytes, |
31 | QuicPacketSequenceNumber sequence_number, | ||||
32 | QuicTime timestamp) override; | ||||
[email protected] | b761c63 | 2012-12-07 22:44:25 | [diff] [blame] | 33 | |
34 | private: | ||||
[email protected] | fee17f7 | 2013-02-03 07:47:41 | [diff] [blame] | 35 | QuicByteCount receive_window_; |
36 | |||||
37 | DISALLOW_COPY_AND_ASSIGN(TcpReceiver); | ||||
[email protected] | b761c63 | 2012-12-07 22:44:25 | [diff] [blame] | 38 | }; |
39 | |||||
40 | } // namespace net | ||||
[email protected] | b761c63 | 2012-12-07 22:44:25 | [diff] [blame] | 41 | #endif // NET_QUIC_CONGESTION_CONTROL_TCP_RECEIVER_H_ |