chromium/third_party/webrtc/net/dcsctp/tx/retransmission_queue.cc

/*
 *  Copyright (c) 2021 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */
#include "net/dcsctp/tx/retransmission_queue.h"

#include <algorithm>
#include <cstdint>
#include <functional>
#include <iterator>
#include <map>
#include <set>
#include <string>
#include <utility>
#include <vector>

#include "absl/algorithm/container.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "api/array_view.h"
#include "net/dcsctp/common/math.h"
#include "net/dcsctp/common/sequence_numbers.h"
#include "net/dcsctp/packet/chunk/data_chunk.h"
#include "net/dcsctp/packet/chunk/forward_tsn_chunk.h"
#include "net/dcsctp/packet/chunk/forward_tsn_common.h"
#include "net/dcsctp/packet/chunk/idata_chunk.h"
#include "net/dcsctp/packet/chunk/iforward_tsn_chunk.h"
#include "net/dcsctp/packet/chunk/sack_chunk.h"
#include "net/dcsctp/packet/data.h"
#include "net/dcsctp/public/dcsctp_options.h"
#include "net/dcsctp/public/types.h"
#include "net/dcsctp/timer/timer.h"
#include "net/dcsctp/tx/outstanding_data.h"
#include "net/dcsctp/tx/send_queue.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/strings/str_join.h"
#include "rtc_base/strings/string_builder.h"

namespace dcsctp {
namespace {
TimeDelta;
Timestamp;
}  // namespace

RetransmissionQueue::RetransmissionQueue(
    absl::string_view log_prefix,
    DcSctpSocketCallbacks* callbacks,
    TSN my_initial_tsn,
    size_t a_rwnd,
    SendQueue& send_queue,
    std::function<void(TimeDelta rtt)> on_new_rtt,
    std::function<void()> on_clear_retransmission_counter,
    Timer& t3_rtx,
    const DcSctpOptions& options,
    bool supports_partial_reliability,
    bool use_message_interleaving)
    :{}

bool RetransmissionQueue::IsConsistent() const {}

// Returns how large a chunk will be, serialized, carrying the data
size_t RetransmissionQueue::GetSerializedChunkSize(const Data& data) const {}

void RetransmissionQueue::MaybeExitFastRecovery(
    UnwrappedTSN cumulative_tsn_ack) {}

void RetransmissionQueue::HandleIncreasedCumulativeTsnAck(
    size_t unacked_bytes,
    size_t total_bytes_acked) {}

void RetransmissionQueue::HandlePacketLoss(UnwrappedTSN highest_tsn_acked) {}

void RetransmissionQueue::UpdateReceiverWindow(uint32_t a_rwnd) {}

void RetransmissionQueue::StartT3RtxTimerIfOutstandingData() {}

bool RetransmissionQueue::IsSackValid(const SackChunk& sack) const {}

bool RetransmissionQueue::HandleSack(Timestamp now, const SackChunk& sack) {}

void RetransmissionQueue::UpdateRTT(Timestamp now,
                                    UnwrappedTSN cumulative_tsn_ack) {}

void RetransmissionQueue::HandleT3RtxTimerExpiry() {}

std::vector<std::pair<TSN, Data>>
RetransmissionQueue::GetChunksForFastRetransmit(size_t bytes_in_packet) {}

std::vector<std::pair<TSN, Data>> RetransmissionQueue::GetChunksToSend(
    Timestamp now,
    size_t bytes_remaining_in_packet) {}

bool RetransmissionQueue::ShouldSendForwardTsn(Timestamp now) {}

size_t RetransmissionQueue::max_bytes_to_send() const {}

void RetransmissionQueue::PrepareResetStream(StreamID stream_id) {}
bool RetransmissionQueue::HasStreamsReadyToBeReset() const {}
std::vector<StreamID> RetransmissionQueue::BeginResetStreams() {}
void RetransmissionQueue::CommitResetStreams() {}
void RetransmissionQueue::RollbackResetStreams() {}

HandoverReadinessStatus RetransmissionQueue::GetHandoverReadiness() const {}

void RetransmissionQueue::AddHandoverState(DcSctpSocketHandoverState& state) {}

void RetransmissionQueue::RestoreFromState(
    const DcSctpSocketHandoverState& state) {}
}  // namespace dcsctp