Trait s2n_tls::callbacks::ConnectionFuture
source · pub trait ConnectionFuture {
fn poll(
self: Pin<&mut Self>,
connection: &mut Connection,
ctx: &mut Context<'_>
) -> Poll<Result<(), Error>>;
}
Expand description
The Future associated with the async connection callback.
The calling application can provide an instance of ConnectionFuture
when implementing an async callback, eg. ClientHelloCallback
, if it wants
to run an asynchronous operation (disk read, network call). The application
can return an error ([Err(error::Error::application())
]), to indicate
connection failure.
ConfigResolver
should be used if the application wants to set a new
Config
on the connection.