#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 {
const QuicByteCount kMaxBurstBytes = …;
const float kRenoBeta = …;
const QuicByteCount kDefaultMinimumCongestionWindow = …;
}
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 ,
QuicPacketCount ) { … }
void TcpCubicSenderBytes::OnPacketAcked(QuicPacketNumber acked_packet_number,
QuicByteCount acked_bytes,
QuicByteCount prior_in_flight,
QuicTime event_time) { … }
void TcpCubicSenderBytes::OnPacketSent(
QuicTime , QuicByteCount ,
QuicPacketNumber packet_number, QuicByteCount bytes,
HasRetransmittableData is_retransmittable) { … }
bool TcpCubicSenderBytes::CanSend(QuicByteCount bytes_in_flight) { … }
QuicBandwidth TcpCubicSenderBytes::PacingRate(
QuicByteCount ) 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 ) { … }
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 { … }
void TcpCubicSenderBytes::MaybeIncreaseCwnd(
QuicPacketNumber , QuicByteCount acked_bytes,
QuicByteCount prior_in_flight, QuicTime event_time) { … }
void TcpCubicSenderBytes::HandleRetransmissionTimeout() { … }
void TcpCubicSenderBytes::OnConnectionMigration() { … }
CongestionControlType TcpCubicSenderBytes::GetCongestionControlType() const { … }
}