Expand description
Draft-22 MoQT endpoint.
Major changes from draft-19:
- FETCH lost its
Fetch Typeand with it the Standalone and Joining Fetch structures (Section 9.11). Track Namespace and Track Name are inline fields, the range travels in theLOCATION_FILTERparameter, andEndpoint::fetchtherefore takes a parameter list where draft-19’s took four location varints.joining_fetchandabsolute_joining_fetchare gone, as isINVALID_JOINING_REQUEST_ID(REQUEST_ERROR 0x32) and every rule this endpoint enforced with it. - Fill fetch streams replace the joining fetch (Section 3.4 and
Section 3.4.1). A SUBSCRIBE or REQUEST_UPDATE carrying
FILL_PARAMETERS(0x23) asks the publisher for a unidirectional stream that opens with a FETCH_HEADER carrying the subscription’s Request ID. This endpoint records the request inEndpoint::fill_requestedso an arriving FETCH_HEADER can be told from a fetch’s, and counts the streams so a PUBLISH_DONE’s Stream Count can include them. - PUBLISH_STATE_NOTIFY (0x22) is new (Section 9.10): unilateral, from
the publisher, on a subscription’s stream, answered with nothing and
explicitly outside the
MAX_REQUEST_UPDATESceiling. - Ranges are inclusive at both ends (Section 3.2, Section 3.3.1,
Section 9.12), so no end location in this module carries draft-19’s
+ 1. INCLUDE_PROPERTIES(0x35) is new;SUBSCRIPTION_ENDED(PUBLISH_DONE 0x3) andVERSION_NEGOTIATION_FAILED(session 0x15) are unassigned.- Six parameters dropped PUBLISH_OK from their scope and several gained
PUBLISH; only
EXPIRESstill names PUBLISH_OK. The table that decides it lives in the codec.
Re-exports§
use std::collections::HashMap;🔒use std::collections::HashSet;🔒use std::sync::Arc;🔒use std::sync::Mutex;🔒use crate::draft22::fetch::FetchError;🔒use crate::draft22::fetch::FetchState;🔒use crate::draft22::fetch::FetchStateMachine;🔒use crate::draft22::fill;🔒use crate::draft22::fill::FillError;🔒use crate::draft22::fill::LocationFilter;🔒use crate::draft22::namespace::NamespaceError;🔒use crate::draft22::namespace::PublishNamespaceState;🔒use crate::draft22::namespace::PublishNamespaceStateMachine;🔒use crate::draft22::namespace::SubscribeNamespaceState;🔒use crate::draft22::namespace::SubscribeNamespaceStateMachine;🔒use crate::draft22::publish::PublishError as PublishFlowError;🔒use crate::draft22::publish::PublishState;🔒use crate::draft22::publish::PublishStateMachine;🔒use crate::draft22::session::request_id::RequestIdAllocator;🔒use crate::draft22::session::request_id::RequestIdError;🔒use crate::draft22::session::request_id::Role;🔒use crate::draft22::session::setup;🔒use crate::draft22::session::setup::SetupError;🔒use moqtap_codec::draft22::data_stream::GroupOrder;🔒use moqtap_codec::kvp::KvpValue;🔒use moqtap_codec::range_filter;🔒use moqtap_codec::range_filter::RangeFilterError;🔒use moqtap_codec::varint::Moqt18;🔒use crate::draft22::session::state::SessionError;🔒use crate::draft22::session::state::SessionState;🔒use crate::draft22::session::state::SessionStateMachine;🔒use crate::draft22::subscription::SubscriptionError;🔒use crate::draft22::subscription::SubscriptionState;🔒use crate::draft22::subscription::SubscriptionStateMachine;🔒use crate::draft22::track_status::TrackStatusError;🔒use crate::draft22::track_status::TrackStatusState;🔒use crate::draft22::track_status::TrackStatusStateMachine;🔒use crate::malformed_tracks::MalformedTrackCondition;🔒use crate::malformed_tracks::MalformedTracks;🔒use crate::track_locations::ObjectLocation;🔒use crate::track_locations::ObjectRole;🔒use crate::track_locations::TrackLocations;🔒use crate::track_locations::TrackObjects;🔒use moqtap_codec::draft22::error_codes::PublishDoneStatusCode;🔒use moqtap_codec::draft22::error_codes::RequestErrorCode;🔒use moqtap_codec::draft22::error_codes::SessionErrorCode;🔒use moqtap_codec::draft22::message;🔒use moqtap_codec::draft22::message::ControlMessage;🔒use moqtap_codec::draft22::message::Fetch;🔒use moqtap_codec::draft22::message::GoAway;🔒use moqtap_codec::draft22::message::MessageType;🔒use moqtap_codec::draft22::message::Publish;🔒use moqtap_codec::draft22::message::PublishDone;🔒use moqtap_codec::draft22::message::PublishNamespace;🔒use moqtap_codec::draft22::message::PublishSkipped;🔒use moqtap_codec::draft22::message::PublishStateNotify;🔒use moqtap_codec::draft22::message::RequestError;🔒use moqtap_codec::draft22::message::RequestOk;🔒use moqtap_codec::draft22::message::RequestUpdate;🔒use moqtap_codec::draft22::message::Setup;🔒use moqtap_codec::draft22::message::Subscribe;🔒use moqtap_codec::draft22::message::SubscribeNamespace;🔒use moqtap_codec::draft22::message::SubscribeOk;🔒use moqtap_codec::draft22::message::SubscribeTracks;🔒use moqtap_codec::draft22::message::FILL_PARAMETERS;🔒use moqtap_codec::kvp::KeyValuePair;🔒use moqtap_codec::varint::VarInt;🔒use moqtap_codec::types::*;🔒
Structs§
- Endpoint
- Fetch
Track 🔒 - The track one fetch is for, which the fetch’s own state machine does not hold.
- Fill
Streams 🔒 - What one subscription’s fill fetch streams amount to, from the point of view of an endpoint that has to attribute an arriving FETCH_HEADER and count the streams a PUBLISH_DONE reports.
- Track
Binding 🔒 - A Track Alias the peer has attached to a Full Track Name, and the request whose lifetime the attachment follows.
Enums§
- Binding
Kind 🔒 - Which of the two sequences Section 3.1 names established the subscription that owns a binding, and so which state machine says whether it still has one.
- Endpoint
Error - Errors that can occur during endpoint operations.
- Filter
Rejection - Why a peer’s request must be answered with REQUEST_ERROR and INVALID_FILTER.
Constants§
- MAX_
FILTER_ 🔒RANGES - The MAX_FILTER_RANGES Setup Option, Section 9.1.6.
- MAX_
REQUEST_ 🔒UPDATES - The MAX_REQUEST_UPDATES Setup Option, Section 9.1.7.
- TRACK_
NAMESPACE_ 🔒PREFIX - Parameter Type of TRACK_NAMESPACE_PREFIX.
Functions§
- apply_
filter_ 🔒update - Apply a REQUEST_UPDATE’s filter parameters to the set already in force.
- prefixes_
overlap 🔒 - Whether two namespace prefixes overlap.
- range_
filter_ 🔒parameters - The Range Filter parameters in
parameters, dropping the removals. - request_
parameters 🔒 - The Message Parameters a request carries, or nothing for a message that is not a request.
- setup_
varint 🔒 - Read a Setup Option’s value as a variable-length integer, or 0 if it is absent.
- updated_
prefix 🔒 - The Track Namespace Prefix a REQUEST_UPDATE asks a namespace subscription
to move to, and
Nonewhen it asks for no such move.