Expand description
MoQ sessions over iroh connections.
Everything needed to turn an iroh connection into a moq_net::Session,
and nothing about nodes, routes or publications:
Transportimplements moq-net’s poll transport on an iroh connection.Transport::connectdials a peer, andTransport::newwraps a connection that is already open, accepted or dialed. Both check the negotiated ALPN. Hand the transport tomoq_net::Client::connectormoq_net::Server::handshake.SendGroupis moq-net’s send group on iroh: it packs a group’s priority and its streams’ orders into iroh’s stream urgency, so equal-priority subscriptions share the bytes.ALPN,alpnsandHANDSHAKE_TIMEOUTare the protocol identifiers to dial and mount a handler with, and the bound on a session’s setup.
MoQ runs on raw QUIC. Raw QUIC has no request URI, so the request path and any token travel in the MoQ SETUP.
use iroh::EndpointId;
use moq_transport_iroh::Transport;
let transport = Transport::connect(&endpoint, peer).await?;
let (session, driver) = moq_net::Client::new()
.connect(moq_net::time::Instant::now(), transport)
.await?;Structs§
- Recv
Stream - The receiving half of a stream.
- Send
Group - A send group, from
send_groupon aTransport. - Send
Stream - The sending half of a stream.
- Transport
- moq-net’s poll transport over one iroh connection.
Enums§
- Error
- An error from dialing or accepting a MoQ connection.
- Transport
Error - A failure of a
Transport’s connection or of one of its streams.
Constants§
- ALPN
- The newest MoQ version this build speaks.
- HANDSHAKE_
TIMEOUT - How long a connection may take to open its MoQ session, dialed or accepted.
Functions§
- alpns
- Returns every ALPN a server accepts, newest MoQ version first.