Skip to main content

Module connection

Module connection 

Source
Expand description

Outbound MoQT connection with MoQT framing over QUIC.

Re-exportsΒ§

use std::collections::VecDeque; πŸ”’
use std::sync::Mutex; πŸ”’
use bytes::Buf; πŸ”’
use bytes::Bytes; πŸ”’
use bytes::BytesMut; πŸ”’
use crate::draft21::endpoint::Endpoint; πŸ”’
use crate::draft21::endpoint::EndpointError; πŸ”’
use crate::draft21::event::ClientEvent; πŸ”’
use crate::draft21::event::Direction; πŸ”’
use crate::draft21::event::StreamKind; πŸ”’
use crate::draft21::fill::LocationFilter; πŸ”’
use crate::draft21::observer::ConnectionObserver; πŸ”’
use crate::draft21::session::request_id::Role; πŸ”’
use crate::draft21::session::setup; πŸ”’
use crate::malformed_tracks::MalformedTrackCondition; πŸ”’
use crate::track_locations::ObjectLocation; πŸ”’
use crate::track_locations::ObjectRole; πŸ”’
use crate::track_locations::TrackObjects; πŸ”’
use crate::transport::RecvStream; πŸ”’
use crate::transport::SendStream; πŸ”’
use crate::transport::Transport; πŸ”’
use crate::transport::TransportError; πŸ”’
use moqtap_codec::dispatch::AnyControlMessage; πŸ”’
use moqtap_codec::dispatch::AnyDatagramHeader; πŸ”’
use moqtap_codec::dispatch::AnyFetchHeader; πŸ”’
use moqtap_codec::dispatch::AnySubgroupHeader; πŸ”’
use moqtap_codec::draft21::data_stream::FetchHeader; πŸ”’
use moqtap_codec::draft21::data_stream::FetchObject; πŸ”’
use moqtap_codec::draft21::data_stream::FetchObjectHeader; πŸ”’
use moqtap_codec::draft21::data_stream::FetchObjectReader; πŸ”’
use moqtap_codec::draft21::data_stream::GroupOrder; πŸ”’
use moqtap_codec::draft21::data_stream::SubgroupObject; πŸ”’
use moqtap_codec::draft21::data_stream::SubgroupObjectReader; πŸ”’
use moqtap_codec::draft21::error_codes::StreamResetErrorCode; πŸ”’
use moqtap_codec::draft21::message::ControlMessage; πŸ”’
use moqtap_codec::draft21::message::FetchOk; πŸ”’
use moqtap_codec::draft21::message::MessageType; πŸ”’
use moqtap_codec::draft21::message::Namespace; πŸ”’
use moqtap_codec::draft21::message::NamespaceDone; πŸ”’
use moqtap_codec::draft21::message::PublishSkipped; πŸ”’
use moqtap_codec::draft21::message::RequestError; πŸ”’
use moqtap_codec::draft21::message::RequestOk; πŸ”’
use moqtap_codec::draft21::message::SubscribeOk; πŸ”’
use moqtap_codec::error::CodecError; πŸ”’
use moqtap_codec::kvp::KeyValuePair; πŸ”’
use moqtap_codec::varint::VarInt; πŸ”’
use moqtap_codec::version::DraftVersion; πŸ”’
use moqtap_codec::types::*; πŸ”’

StructsΒ§

ClientConfig
Configuration for a MoQT client connection.
Connection
A live MoQT connection over QUIC or WebTransport, combining the endpoint state machine with actual network I/O.
FramedRecvStream
A framed reader for a recv stream. Handles MoQT varint-length decoding.
FramedSendStream
A framed writer for a send stream. Handles MoQT length-prefixed framing.
PendingInbound πŸ”’
Holds a peer-opened stream pair while its first message is being read, and puts it back on the connection’s queue if that read is abandoned.
RequestStream
One request and its answer, on a bidirectional stream of their own.

EnumsΒ§

ConnectionError
Errors from the connection layer.
RequestKind
Which of the seven message types draft-21 Section 6.3 lets a bidirectional stream begin with opened a request stream.
RequestOrigin
Which side opened the bidirectional stream a request travels on.
TransportType
Transport type for the connection.

ConstantsΒ§

CONTROL_STREAM_TYPE
The unidirectional stream type that marks one direction of the control plane, and the SETUP message type. On draft-21 they are one number, 0x2F00: Section 6.4.1 (Unidirectional Stream Types) lists it as the type of a SETUP stream, and Section 9.1 gives it as the SETUP message’s own type field.
FETCH_STREAM_TYPE πŸ”’
The unidirectional stream type of FETCH_HEADER, 0x05 (draft-21 Section 6.4.1).
MAX_QUIC_VARINT πŸ”’
The largest value a QUIC application error code can carry, 2^62 - 1.
MOQT_ALPN
The ALPN identifier draft-21 uses on raw QUIC, moqt-21.
REQUEST_CANCELLED
The application error code a request stream is reset with when the requester abandons it: CANCELLED, 0x1.
REQUEST_UNANSWERED
The application error code a request stream the peer opened is reset with when this endpoint abandons it: INTERNAL_ERROR, 0x0.

FunctionsΒ§

belongs_on_a_request_stream πŸ”’
Whether draft-21 Table 5 places this message on a request stream that is already open.
malformed_track_condition πŸ”’
The Malformed Track condition a codec refusal on a data path is, on this draft, or None for a refusal that is not one.
object_role πŸ”’
What an Object Status makes of an object here.
starts_a_request_stream
Whether ty is one of the seven message types draft-21 Section 6.3 lets a bidirectional stream begin with.