#[non_exhaustive]pub struct ClientConfig {
pub connect: Option<Url>,
pub bind: SocketAddr,
pub backend: Option<QuicBackend>,
pub failover_delay: Option<Duration>,
pub timeout: Option<Duration>,
pub quic: Client,
pub version: Vec<Version>,
pub tls: Client,
pub backoff: Backoff,
pub websocket: Client,
}Expand description
Configuration for the MoQ client.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.connect: Option<Url>The URL to dial.
Supports WebTransport (https/http), WebSocket (ws/wss), raw QUIC
(moqt/moql), qmux over tcp/unix, and iroh. The URL path is the
request/auth path (e.g. /anon for a public relay) and ?jwt= supplies a
token. http:// first fetches /certificate.sha256 for the (insecure)
self-signed fingerprint; https:// connects directly.
bind: SocketAddrListen for UDP packets on the given address.
backend: Option<QuicBackend>The QUIC backend to use. Auto-detected from compiled features if not specified.
failover_delay: Option<Duration>Delay before also dialing the next resolved address (Happy Eyeballs).
When DNS returns multiple addresses, attempts alternate between IPv6 and
IPv4, each starting this long after the previous one (or immediately when
it fails), and the first connection to complete wins. 0s dials every
address at once. Defaults to 250ms. Applies to the QUIC and tcp:// dials.
This staggers the attempts within one Client::connect; Self::timeout
bounds that call as a whole.
timeout: Option<Duration>Maximum time for one Client::connect, covering the dial and the MoQ
handshake. Defaults to 30 seconds; set to 0 to wait forever.
This has to live above the transports rather than inside one: QUIC bounds its
own dial, but the WebSocket fallback and the handshake that follows either
transport have no deadline of their own, so a peer that accepts TCP and then
never speaks would hang the whole connect. Client::reconnect only re-arms
its backoff between attempts, so an attempt that never returns stalls the
retry loop indefinitely.
quic: ClientQUIC transport tuning (--client-quic-*): stream limits, GSO, timeouts.
version: Vec<Version>Restrict the client to specific MoQ protocol version(s).
By default, the client offers all supported versions and lets the server choose.
Use this to force a specific version, e.g. --client-version moq-lite-02.
Can be specified multiple times to offer a subset of versions.
Valid values: moq-lite-01, moq-lite-02, moq-lite-03, moq-transport-14, moq-transport-15, moq-transport-16, moq-transport-17
tls: ClientTLS trust and client-certificate settings (--client-tls-*).
backoff: BackoffRetry pacing for Client::reconnect (--client-backoff-*).
websocket: ClientWebSocket fallback settings (--client-websocket-*), used when QUIC is
blocked.
Implementations§
Trait Implementations§
Source§impl Args for ClientConfig
impl Args for ClientConfig
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl CommandFactory for ClientConfig
impl CommandFactory for ClientConfig
Source§impl Debug for ClientConfig
impl Debug for ClientConfig
Source§impl Default for ClientConfig
impl Default for ClientConfig
Source§impl<'de> Deserialize<'de> for ClientConfigwhere
ClientConfig: Default,
impl<'de> Deserialize<'de> for ClientConfigwhere
ClientConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FromArgMatches for ClientConfig
impl FromArgMatches for ClientConfig
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.