pub struct QuicClientConfig { /* private fields */ }
Expand description
A QUIC-compatible TLS client configuration
Quinn implicitly constructs a QuicClientConfig
with reasonable defaults within
ClientConfig::with_root_certificates()
and ClientConfig::with_platform_verifier()
.
Alternatively, QuicClientConfig
’s TryFrom
implementation can be used to wrap around a
custom rustls::ClientConfig
, in which case care should be taken around certain points:
- If
enable_early_data
is not set to true, then sending 0-RTT data will not be possible on outgoing connections. - The
rustls::ClientConfig
must have TLS 1.3 support enabled for conversion to succeed.
The object in the resumption
field of the inner rustls::ClientConfig
determines whether
calling into_0rtt
on outgoing connections returns Ok
or Err
. It typically allows
into_0rtt
to proceed if it recognizes the server name, and defaults to an in-memory cache of
256 server names.
Implementations§
Source§impl QuicClientConfig
impl QuicClientConfig
Sourcepub fn with_initial(
inner: Arc<ClientConfig>,
initial: Suite,
) -> Result<Self, NoInitialCipherSuite>
pub fn with_initial( inner: Arc<ClientConfig>, initial: Suite, ) -> Result<Self, NoInitialCipherSuite>
Initialize a QUIC-compatible TLS client configuration with a separate initial cipher suite
This is useful if you want to avoid the initial cipher suite for traffic encryption.