#include "net/dcsctp/rx/reassembly_queue.h"
#include <stddef.h>
#include <algorithm>
#include <cstdint>
#include <memory>
#include <set>
#include <string>
#include <utility>
#include <vector>
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "api/array_view.h"
#include "net/dcsctp/common/sequence_numbers.h"
#include "net/dcsctp/packet/chunk/forward_tsn_common.h"
#include "net/dcsctp/packet/data.h"
#include "net/dcsctp/packet/parameter/outgoing_ssn_reset_request_parameter.h"
#include "net/dcsctp/packet/parameter/reconfiguration_response_parameter.h"
#include "net/dcsctp/public/dcsctp_handover_state.h"
#include "net/dcsctp/public/dcsctp_message.h"
#include "net/dcsctp/public/types.h"
#include "net/dcsctp/rx/interleaved_reassembly_streams.h"
#include "net/dcsctp/rx/reassembly_streams.h"
#include "net/dcsctp/rx/traditional_reassembly_streams.h"
#include "rtc_base/logging.h"
#include "rtc_base/strings/str_join.h"
namespace dcsctp {
namespace {
std::unique_ptr<ReassemblyStreams> CreateStreams(
absl::string_view log_prefix,
ReassemblyStreams::OnAssembledMessage on_assembled_message,
bool use_message_interleaving) { … }
}
ReassemblyQueue::ReassemblyQueue(absl::string_view log_prefix,
size_t max_size_bytes,
bool use_message_interleaving)
: … { … }
void ReassemblyQueue::Add(TSN tsn, Data data) { … }
void ReassemblyQueue::ResetStreamsAndLeaveDeferredReset(
rtc::ArrayView<const StreamID> stream_ids) { … }
void ReassemblyQueue::EnterDeferredReset(
TSN sender_last_assigned_tsn,
rtc::ArrayView<const StreamID> streams) { … }
std::vector<DcSctpMessage> ReassemblyQueue::FlushMessages() { … }
void ReassemblyQueue::AddReassembledMessage(
rtc::ArrayView<const UnwrappedTSN> tsns,
DcSctpMessage message) { … }
void ReassemblyQueue::HandleForwardTsn(
TSN new_cumulative_tsn,
rtc::ArrayView<const AnyForwardTsnChunk::SkippedStream> skipped_streams) { … }
bool ReassemblyQueue::IsConsistent() const { … }
HandoverReadinessStatus ReassemblyQueue::GetHandoverReadiness() const { … }
void ReassemblyQueue::AddHandoverState(DcSctpSocketHandoverState& state) { … }
void ReassemblyQueue::RestoreFromState(const DcSctpSocketHandoverState& state) { … }
}