chromium/net/third_party/quiche/src/quiche/quic/core/congestion_control/cubic_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/cubic_bytes.h"

#include <algorithm>
#include <cmath>
#include <cstdint>

#include "quiche/quic/core/quic_constants.h"
#include "quiche/quic/core/quic_packets.h"
#include "quiche/quic/platform/api/quic_flag_utils.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.
// The following constants are in 2^10 fractions of a second instead of ms to
// allow a 10 shift right to divide.
const int kCubeScale =;  // 1024*1024^3 (first 1024 is from 0.100^3)
                            // where 0.100 is 100 ms which is the scaling
                            // round trip time.
const int kCubeCongestionWindowScale =;
// The cube factor for packets in bytes.
const uint64_t kCubeFactor =;

const float kDefaultCubicBackoffFactor =;  // Default Cubic backoff factor.
// Additional backoff factor when loss occurs in the concave part of the Cubic
// curve. This additional backoff factor is expected to give up bandwidth to
// new concurrent flows and speed up convergence.
const float kBetaLastMax =;

}  // namespace

CubicBytes::CubicBytes(const QuicClock* clock)
    :{}

void CubicBytes::SetNumConnections(int num_connections) {}

float CubicBytes::Alpha() const {}

float CubicBytes::Beta() const {}

float CubicBytes::BetaLastMax() const {}

void CubicBytes::ResetCubicState() {}

void CubicBytes::OnApplicationLimited() {}

QuicByteCount CubicBytes::CongestionWindowAfterPacketLoss(
    QuicByteCount current_congestion_window) {}

QuicByteCount CubicBytes::CongestionWindowAfterAck(
    QuicByteCount acked_bytes, QuicByteCount current_congestion_window,
    QuicTime::Delta delay_min, QuicTime event_time) {}

}  // namespace quic