pub struct ClientConfig { /* private fields */ }
Expand description
Configuration for a client-side QUIC. Wraps around a BoringSSL SslContext.
Implementations§
Source§impl Config
impl Config
pub fn new() -> Result<Self>
Sourcepub fn ctx(&self) -> &SslContext
pub fn ctx(&self) -> &SslContext
Returns the underlying SslContext backing all created sessions.
Sourcepub fn ctx_mut(&mut self) -> &mut SslContext
pub fn ctx_mut(&mut self) -> &mut SslContext
Returns the underlying SslContext backing all created sessions. Wherever possible use the provided methods to modify settings rather than accessing this directly.
Care should be taken to avoid overriding required behavior. In particular, this configuration will set callbacks for QUIC events, alpn selection, server name, as well as info and key logging.
Sourcepub fn verify_peer(&mut self, verify: bool)
pub fn verify_peer(&mut self, verify: bool)
Sets whether or not the peer certificate should be verified. If true
, any error
during verification will be fatal. If not called, verification of the server is
enabled by default.
Sourcepub fn get_session_cache(&self) -> Arc<dyn SessionCache>
pub fn get_session_cache(&self) -> Arc<dyn SessionCache>
Gets the SessionCache used to cache all client sessions.
Sourcepub fn set_session_cache(&mut self, session_cache: Arc<dyn SessionCache>)
pub fn set_session_cache(&mut self, session_cache: Arc<dyn SessionCache>)
Sets the SessionCache to be shared by all created client sessions.