Skip to main content

QuicClientConfig

Trait QuicClientConfig 

Source
pub trait QuicClientConfig<C: Connector>:
    Send
    + Sync
    + 'static {
    type Endpoint: QuicEndpoint;

    // Required method
    fn bind(
        &self,
        addr: SocketAddr,
        runtime: &C::Runtime,
    ) -> Result<Self::Endpoint>;
}
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::Runtime) -> Result<Self::Endpoint>

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§