pub trait ClientHelloCallback {
    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 TLS Client Hello.

Use in conjunction with config::Builder::set_client_hello_callback.

Required Methods§

The application can return a Ok(None) to resolve the client_hello_callback synchronously or return a 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 must call [connection::Connection::server_name_extension_used()].

Implementors§