Skip to main content

run_relay_announce_link

Function run_relay_announce_link 

Source
pub async fn run_relay_announce_link(
    producer: &OriginProducer,
    relay: &TransportConfig,
    admission_proof: Option<&MoqlAdmissionProof>,
    relay_server_identity: Option<&MoqlServerIdentity>,
) -> Result<()>
Expand description

One connect-and-hold cycle of the producer→relay announce link (#358).

Dials the relay, runs the moq handshake bidirectionally (with_origin), and returns when the session closes so the caller can reconnect. The relay ingests the announced broadcasts and re-serves them to its subscribers by track name — the producer never learns who subscribes, the subscriber never dials the producer.

Exposed (rather than only via serve_origin_to_relay_background) so a caller that owns its own reconnect/lifecycle — and the rendezvous test — can drive a single connect cycle directly.