Trait s2n_quic_tls::callbacks::ClientHelloCallback
source · pub trait ClientHelloCallback:
'static
+ Send
+ Sync {
// Required method
fn on_client_hello(
&self,
connection: &mut Connection,
) -> Result<Option<Pin<Box<dyn ConnectionFuture>>>, Error>;
}
Expand description
A trait for the callback executed after parsing the ClientHello message.
Use in conjunction with config::Builder::set_client_hello_callback.
Required Methods§
sourcefn on_client_hello(
&self,
connection: &mut Connection,
) -> Result<Option<Pin<Box<dyn ConnectionFuture>>>, Error>
fn on_client_hello( &self, connection: &mut Connection, ) -> Result<Option<Pin<Box<dyn ConnectionFuture>>>, Error>
The application can return an Ok(None)
to resolve the callback
synchronously or return an Ok(Some(ConnectionFuture))
if it wants to
run some asynchronous task before resolving the callback.
ConfigResolver
, which implements ConnectionFuture
can be
returned if the application wants to set a new Config
on the connection.
If the server_name is used to configure the connection then the application
should call Connection::server_name_extension_used()
.