chromium/net/third_party/quiche/src/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes.cc

// Copyright (c) 2015 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 "quiche/quic/core/congestion_control/tcp_cubic_sender_bytes.h"

#include <algorithm>
#include <cstdint>
#include <string>

#include "quiche/quic/core/congestion_control/prr_sender.h"
#include "quiche/quic/core/congestion_control/rtt_stats.h"
#include "quiche/quic/core/crypto/crypto_protocol.h"
#include "quiche/quic/core/quic_constants.h"
#include "quiche/quic/platform/api/quic_bug_tracker.h"
#include "quiche/quic/platform/api/quic_flags.h"
#include "quiche/quic/platform/api/quic_logging.h"

namespace quic {

namespace {
// Constants based on TCP defaults.
const QuicByteCount kMaxBurstBytes =;
const float kRenoBeta =;  // Reno backoff factor.
// The minimum cwnd based on RFC 3782 (TCP NewReno) for cwnd reductions on a
// fast retransmission.
const QuicByteCount kDefaultMinimumCongestionWindow =;
}  // namespace

TcpCubicSenderBytes::TcpCubicSenderBytes(
    const QuicClock* clock, const RttStats* rtt_stats, bool reno,
    QuicPacketCount initial_tcp_congestion_window,
    QuicPacketCount max_congestion_window, QuicConnectionStats* stats)
    :{}

TcpCubicSenderBytes::~TcpCubicSenderBytes() {}

void TcpCubicSenderBytes::SetFromConfig(const QuicConfig& config,
                                        Perspective perspective) {}

void TcpCubicSenderBytes::AdjustNetworkParameters(const NetworkParams& params) {}

float TcpCubicSenderBytes::RenoBeta() const {}

void TcpCubicSenderBytes::OnCongestionEvent(
    bool rtt_updated, QuicByteCount prior_in_flight, QuicTime event_time,
    const AckedPacketVector& acked_packets,
    const LostPacketVector& lost_packets, QuicPacketCount /*num_ect*/,
    QuicPacketCount /*num_ce*/) {}

void TcpCubicSenderBytes::OnPacketAcked(QuicPacketNumber acked_packet_number,
                                        QuicByteCount acked_bytes,
                                        QuicByteCount prior_in_flight,
                                        QuicTime event_time) {}

void TcpCubicSenderBytes::OnPacketSent(
    QuicTime /*sent_time*/, QuicByteCount /*bytes_in_flight*/,
    QuicPacketNumber packet_number, QuicByteCount bytes,
    HasRetransmittableData is_retransmittable) {}

bool TcpCubicSenderBytes::CanSend(QuicByteCount bytes_in_flight) {}

QuicBandwidth TcpCubicSenderBytes::PacingRate(
    QuicByteCount /* bytes_in_flight */) const {}

QuicBandwidth TcpCubicSenderBytes::BandwidthEstimate() const {}

bool TcpCubicSenderBytes::InSlowStart() const {}

bool TcpCubicSenderBytes::IsCwndLimited(QuicByteCount bytes_in_flight) const {}

bool TcpCubicSenderBytes::InRecovery() const {}

void TcpCubicSenderBytes::OnRetransmissionTimeout(bool packets_retransmitted) {}

std::string TcpCubicSenderBytes::GetDebugState() const {}

void TcpCubicSenderBytes::OnApplicationLimited(
    QuicByteCount /*bytes_in_flight*/) {}

void TcpCubicSenderBytes::SetCongestionWindowFromBandwidthAndRtt(
    QuicBandwidth bandwidth, QuicTime::Delta rtt) {}

void TcpCubicSenderBytes::SetInitialCongestionWindowInPackets(
    QuicPacketCount congestion_window) {}

void TcpCubicSenderBytes::SetMinCongestionWindowInPackets(
    QuicPacketCount congestion_window) {}

void TcpCubicSenderBytes::SetNumEmulatedConnections(int num_connections) {}

void TcpCubicSenderBytes::ExitSlowstart() {}

void TcpCubicSenderBytes::OnPacketLost(QuicPacketNumber packet_number,
                                       QuicByteCount lost_bytes,
                                       QuicByteCount prior_in_flight) {}

QuicByteCount TcpCubicSenderBytes::GetCongestionWindow() const {}

QuicByteCount TcpCubicSenderBytes::GetSlowStartThreshold() const {}

// Called when we receive an ack. Normal TCP tracks how many packets one ack
// represents, but quic has a separate ack for each packet.
void TcpCubicSenderBytes::MaybeIncreaseCwnd(
    QuicPacketNumber /*acked_packet_number*/, QuicByteCount acked_bytes,
    QuicByteCount prior_in_flight, QuicTime event_time) {}

void TcpCubicSenderBytes::HandleRetransmissionTimeout() {}

void TcpCubicSenderBytes::OnConnectionMigration() {}

CongestionControlType TcpCubicSenderBytes::GetCongestionControlType() const {}

}  // namespace quic