| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // TCP receiver side congestion algorithm, emulates the behaviour of TCP. | 5 // TCP receiver side congestion algorithm, emulates the behaviour of TCP. |
| 6 | 6 |
| 7 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_RECEIVER_H_ | 7 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_RECEIVER_H_ |
| 8 #define NET_QUIC_CONGESTION_CONTROL_TCP_RECEIVER_H_ | 8 #define NET_QUIC_CONGESTION_CONTROL_TCP_RECEIVER_H_ |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
| 13 #include "net/quic/congestion_control/receive_algorithm_interface.h" | 13 #include "net/quic/congestion_control/receive_algorithm_interface.h" |
| 14 #include "net/quic/quic_clock.h" | 14 #include "net/quic/quic_clock.h" |
| 15 #include "net/quic/quic_protocol.h" | 15 #include "net/quic/quic_protocol.h" |
| 16 | 16 |
| 17 namespace net { | 17 namespace net { |
| 18 | 18 |
| 19 class NET_EXPORT_PRIVATE TcpReceiver : public ReceiveAlgorithmInterface { | 19 class NET_EXPORT_PRIVATE TcpReceiver : public ReceiveAlgorithmInterface { |
| 20 public: | 20 public: |
| 21 TcpReceiver(); | 21 TcpReceiver(); |
| 22 | 22 |
| 23 // Size of the (currently fixed) receive window. | 23 // Size of the (currently fixed) receive window. |
| 24 static const QuicByteCount kReceiveWindowTCP; | 24 static const QuicByteCount kReceiveWindowTCP; |
| 25 | 25 |
| 26 // Start implementation of SendAlgorithmInterface. | 26 // Start implementation of SendAlgorithmInterface. |
| 27 virtual bool GenerateCongestionFeedback( | 27 virtual bool GenerateCongestionFeedback( |
| 28 QuicCongestionFeedbackFrame* feedback) OVERRIDE; | 28 QuicCongestionFeedbackFrame* feedback) override; |
| 29 | 29 |
| 30 virtual void RecordIncomingPacket(QuicByteCount bytes, | 30 virtual void RecordIncomingPacket(QuicByteCount bytes, |
| 31 QuicPacketSequenceNumber sequence_number, | 31 QuicPacketSequenceNumber sequence_number, |
| 32 QuicTime timestamp) OVERRIDE; | 32 QuicTime timestamp) override; |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 QuicByteCount receive_window_; | 35 QuicByteCount receive_window_; |
| 36 | 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(TcpReceiver); | 37 DISALLOW_COPY_AND_ASSIGN(TcpReceiver); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 } // namespace net | 40 } // namespace net |
| 41 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_RECEIVER_H_ | 41 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_RECEIVER_H_ |
| OLD | NEW |