| 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 // Fix rate send side congestion control, used for testing. | 5 // Fix rate send side congestion control, used for testing. |
| 6 | 6 |
| 7 #ifndef NET_QUIC_CONGESTION_CONTROL_FIX_RATE_SENDER_H_ | 7 #ifndef NET_QUIC_CONGESTION_CONTROL_FIX_RATE_SENDER_H_ |
| 8 #define NET_QUIC_CONGESTION_CONTROL_FIX_RATE_SENDER_H_ | 8 #define NET_QUIC_CONGESTION_CONTROL_FIX_RATE_SENDER_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/quic_clock.h" | 13 #include "net/quic/quic_clock.h" |
| 14 #include "net/quic/quic_time.h" | 14 #include "net/quic/quic_time.h" |
| 15 #include "net/quic/congestion_control/leaky_bucket.h" | 15 #include "net/quic/congestion_control/leaky_bucket.h" |
| 16 #include "net/quic/congestion_control/paced_sender.h" | 16 #include "net/quic/congestion_control/paced_sender.h" |
| 17 #include "net/quic/congestion_control/send_algorithm_interface.h" | 17 #include "net/quic/congestion_control/send_algorithm_interface.h" |
| 18 | 18 |
| 19 namespace net { | 19 namespace net { |
| 20 | 20 |
| 21 class NET_EXPORT_PRIVATE FixRateSender : public SendAlgorithmInterface { | 21 class NET_EXPORT_PRIVATE FixRateSender : public SendAlgorithmInterface { |
| 22 public: | 22 public: |
| 23 explicit FixRateSender(const QuicClock* clock); | 23 explicit FixRateSender(const QuicClock* clock); |
| 24 virtual ~FixRateSender(); | 24 virtual ~FixRateSender() OVERRIDE; |
| 25 | 25 |
| 26 // Start implementation of SendAlgorithmInterface. | 26 // Start implementation of SendAlgorithmInterface. |
| 27 virtual void SetFromConfig(const QuicConfig& config, bool is_server) OVERRIDE; | 27 virtual void SetFromConfig(const QuicConfig& config, bool is_server) OVERRIDE; |
| 28 virtual void SetMaxPacketSize(QuicByteCount max_packet_size) OVERRIDE; | 28 virtual void SetMaxPacketSize(QuicByteCount max_packet_size) OVERRIDE; |
| 29 virtual void OnIncomingQuicCongestionFeedbackFrame( | 29 virtual void OnIncomingQuicCongestionFeedbackFrame( |
| 30 const QuicCongestionFeedbackFrame& feedback, | 30 const QuicCongestionFeedbackFrame& feedback, |
| 31 QuicTime feedback_receive_time, | 31 QuicTime feedback_receive_time, |
| 32 const SentPacketsMap& sent_packets) OVERRIDE; | 32 const SentPacketsMap& sent_packets) OVERRIDE; |
| 33 virtual void OnPacketAcked(QuicPacketSequenceNumber acked_sequence_number, | 33 virtual void OnPacketAcked(QuicPacketSequenceNumber acked_sequence_number, |
| 34 QuicByteCount acked_bytes, | 34 QuicByteCount acked_bytes, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 64 PacedSender paced_sender_; | 64 PacedSender paced_sender_; |
| 65 QuicByteCount data_in_flight_; | 65 QuicByteCount data_in_flight_; |
| 66 QuicTime::Delta latest_rtt_; | 66 QuicTime::Delta latest_rtt_; |
| 67 | 67 |
| 68 DISALLOW_COPY_AND_ASSIGN(FixRateSender); | 68 DISALLOW_COPY_AND_ASSIGN(FixRateSender); |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace net | 71 } // namespace net |
| 72 | 72 |
| 73 #endif // NET_QUIC_CONGESTION_CONTROL_FIX_RATE_SENDER_H_ | 73 #endif // NET_QUIC_CONGESTION_CONTROL_FIX_RATE_SENDER_H_ |
| OLD | NEW |