blob: a13362ff226b14266cd24e0cf0144494080a9931 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/quic/congestion_control/fix_rate_receiver.h"
#include "base/basictypes.h"
#include "net/quic/congestion_control/receive_algorithm_interface.h"
namespace {
static const int kInitialBitrate = 100000; // In bytes per second.
}
namespace net {
FixRateReceiver::FixRateReceiver()
: configured_rate_(QuicBandwidth::FromBytesPerSecond(kInitialBitrate)) {
}
bool FixRateReceiver::GenerateCongestionFeedback(
QuicCongestionFeedbackFrame* feedback) {
feedback->type = kFixRate;
feedback->fix_rate.bitrate = configured_rate_;
return true;
}
void FixRateReceiver::RecordIncomingPacket(
QuicByteCount /*bytes*/,
QuicPacketSequenceNumber /*sequence_number*/,
QuicTime /*timestamp*/) {
// Nothing to do for this simple implementation.
}
} // namespace net
|