blob: 7f3c0760101f4160f7893830aca07a4b58c8c15d [file] [log] [blame]
// 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/quic_receipt_metrics_collector.h"
#include "net/quic/congestion_control/receive_algorithm_interface.h"
namespace net {
QuicReceiptMetricsCollector::QuicReceiptMetricsCollector(
const QuicClock* clock,
CongestionFeedbackType type)
: receive_algorithm_(ReceiveAlgorithmInterface::Create(clock, type)) {
}
QuicReceiptMetricsCollector::~QuicReceiptMetricsCollector() {
}
bool QuicReceiptMetricsCollector::GenerateCongestionFeedback(
QuicCongestionFeedbackFrame* feedback) {
return receive_algorithm_->GenerateCongestionFeedback(feedback);
}
void QuicReceiptMetricsCollector::RecordIncomingPacket(
size_t bytes,
QuicPacketSequenceNumber sequence_number,
QuicTime timestamp,
bool revived) {
receive_algorithm_->RecordIncomingPacket(bytes, sequence_number, timestamp,
revived);
}
} // namespace net