pub trait ConnectionHook {
// Required method
fn create_custom_ssl_context_builder(
&self,
settings: TlsCertificatePaths<'_>,
) -> Option<SslContextBuilder>;
// Provided method
fn on_path_event(&self, _qconn: &mut QuicheConnection, _event: &PathEvent) { ... }
}Expand description
A set of hooks executed at the level of a quiche::Connection.
Required Methods§
Sourcefn create_custom_ssl_context_builder(
&self,
settings: TlsCertificatePaths<'_>,
) -> Option<SslContextBuilder>
fn create_custom_ssl_context_builder( &self, settings: TlsCertificatePaths<'_>, ) -> Option<SslContextBuilder>
Constructs an optional [SslContextBuilder].
This method allows full customization of quiche’s SSL context, for example to specify async callbacks during the QUIC handshake. It is called once per socket during initial setup, and then reused across all connections on that socket.
Only called if both the hook and TlsCertificatePaths are set in
ConnectionParams.
Provided Methods§
Sourcefn on_path_event(&self, _qconn: &mut QuicheConnection, _event: &PathEvent)
fn on_path_event(&self, _qconn: &mut QuicheConnection, _event: &PathEvent)
Called when the QUIC connection reports a path-specific event.
This runs synchronously on the connection’s I/O worker and must not block. Applications that need asynchronous processing should copy the event into a non-blocking channel.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".