Hello, dial
connect(), which:
- Configures a
quinn::Endpointwith system-trusted roots and ALPNh3. - Connects to the gateway.
- Spawns the
accept_uniloop that driveson_audio_frame/on_call_event. - Sends the initial
EventStreamRequest.
Receiving audio and events
OnAudioFrame and OnCallEvent are Arc<dyn Fn(Vec<u8>) + Send + Sync>,
so you can clone them into spawned tasks freely.
Pushing audio
Hanging up
Long-running services
For a service that lives for hours, hold the client across many RPC calls. The QUIC connection auto-reconnects through quinn’s keepalive — but mid-flight RPCs in the gap will returnErr, so retry your dialer loop: