Home | History | Annotate | Download | only in congestion_control
      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 // Fix rate receive side congestion control, used for initial testing.
      6 
      7 #ifndef NET_QUIC_CONGESTION_CONTROL_FIX_RATE_RECEIVER_H_
      8 #define NET_QUIC_CONGESTION_CONTROL_FIX_RATE_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_bandwidth.h"
     15 
     16 namespace net {
     17 
     18 namespace test {
     19 class FixRateReceiverPeer;
     20 }  // namespace test
     21 
     22 class NET_EXPORT_PRIVATE FixRateReceiver : public ReceiveAlgorithmInterface {
     23  public:
     24   FixRateReceiver();
     25 
     26   // Implements ReceiveAlgorithmInterface.
     27   virtual bool GenerateCongestionFeedback(
     28       QuicCongestionFeedbackFrame* feedback) OVERRIDE;
     29 
     30   // Implements ReceiveAlgorithmInterface.
     31   virtual void RecordIncomingPacket(QuicByteCount bytes,
     32                                     QuicPacketSequenceNumber sequence_number,
     33                                     QuicTime timestamp,
     34                                     bool recovered) OVERRIDE;
     35  private:
     36   friend class test::FixRateReceiverPeer;
     37 
     38   QuicBandwidth configured_rate_;
     39 
     40   DISALLOW_COPY_AND_ASSIGN(FixRateReceiver);
     41 };
     42 
     43 }  // namespace net
     44 #endif  // NET_QUIC_CONGESTION_CONTROL_FIX_RATE_RECEIVER_H_
     45