Skip to main content

QuicClientConfig

Trait QuicClientConfig 

Source
pub trait QuicClientConfig<C>:
    Send
    + Sync
    + 'static
where C: Connector,
{ type Endpoint: QuicEndpoint; // Required method fn bind( &self, addr: SocketAddr, runtime: &<C as Connector>::Runtime, ) -> Result<Self::Endpoint, Error>; }
Expand description

Factory for creating client-side QUIC endpoints.

Parameterised over C: Connector so that the concrete runtime and UDP socket types are available to the implementation without coupling the QUIC library to any specific runtime adapter.

Implementations should produce a QuicEndpoint bound to the given local address. TLS configuration is embedded in the implementation.

Required Associated Types§

Source

type Endpoint: QuicEndpoint

The endpoint type produced by bind.

Required Methods§

Source

fn bind( &self, addr: SocketAddr, runtime: &<C as Connector>::Runtime, ) -> Result<Self::Endpoint, Error>

Bind a QUIC endpoint to the given local address.

runtime is the runtime from the paired Connector; use it for spawning, timers, and UDP I/O.

Implementors§