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::draft17::endpoint::Endpoint; πŸ”’
use crate::draft17::endpoint::EndpointError; πŸ”’
use crate::draft17::event::ClientEvent; πŸ”’
use crate::draft17::event::Direction; πŸ”’
use crate::draft17::event::StreamKind; πŸ”’
use crate::draft17::observer::ConnectionObserver; πŸ”’
use crate::draft17::session::request_id::Role; πŸ”’
use crate::draft17::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::draft17::data_stream::FetchHeader; πŸ”’
use moqtap_codec::draft17::data_stream::FetchObject; πŸ”’
use moqtap_codec::draft17::data_stream::FetchObjectHeader; πŸ”’
use moqtap_codec::draft17::data_stream::FetchObjectReader; πŸ”’
use moqtap_codec::draft17::data_stream::SubgroupObject; πŸ”’
use moqtap_codec::draft17::data_stream::SubgroupObjectReader; πŸ”’
use moqtap_codec::draft17::error_codes::DataStreamResetErrorCode; πŸ”’
use moqtap_codec::draft17::message::ControlMessage; πŸ”’
use moqtap_codec::draft17::message::FetchOk; πŸ”’
use moqtap_codec::draft17::message::MessageType; πŸ”’
use moqtap_codec::draft17::message::PublishOk; πŸ”’
use moqtap_codec::draft17::message::RequestError; πŸ”’
use moqtap_codec::draft17::message::RequestOk; πŸ”’
use moqtap_codec::draft17::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 six message types draft-17 Section 3.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-17 they are one number, 0x2F00: Section 3.4 (Unidirectional Stream Types) lists it as the type of a SETUP stream, and Section 9.4 gives it as the SETUP message’s own type field.
MAX_QUIC_VARINT πŸ”’
The largest value a QUIC application error code can carry, 2^62 - 1.
MOQT_ALPN
The ALPN identifier draft-17 uses on raw QUIC, moqt-17.
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-17 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 six message types draft-17 Section 3.3 lets a bidirectional stream begin with.