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§

source

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().

Implementors§