pub struct Accepted<T: Transport> { /* private fields */ }Expand description
Represents that a ClientHello message has been received.
The handshake can be progressed by choosing a ServerConfig based on
Self::client_hello() and providing it to Self::choose_config().
Implementations§
Source§impl<T: Transport> Accepted<T>
impl<T: Transport> Accepted<T>
Sourcepub fn client_hello(&self) -> ClientHello<'_>
pub fn client_hello(&self) -> ClientHello<'_>
Get the ClientHello for this connection.
Source§impl Accepted<Tcp>
impl Accepted<Tcp>
Sourcepub fn choose_config(
self,
config: Arc<ServerConfig>,
tls: &mut Vec<u8>,
) -> Result<ServerHandshake, Error>
pub fn choose_config( self, config: Arc<ServerConfig>, tls: &mut Vec<u8>, ) -> Result<ServerHandshake, Error>
Choose a ServerConfig to progress the handshake.
Output to send to the peer is appended to tls. Typically, this is the ServerHello,
but it may also be an Alert if an error is returned.
Returns an error if configuration-dependent validation of the received ClientHello message fails.
Source§impl Accepted<Quic>
impl Accepted<Quic>
Sourcepub fn choose_config(
self,
config: Arc<ServerConfig>,
params: Vec<u8>,
output: &mut Vec<QuicEvent>,
) -> Result<ServerHandshake, Error>
pub fn choose_config( self, config: Arc<ServerConfig>, params: Vec<u8>, output: &mut Vec<QuicEvent>, ) -> Result<ServerHandshake, Error>
Choose a ServerConfig to progress the handshake.
Resolves an Accepted, providing the ServerConfig that should be used for
the session, and the TLS-encoded QUIC transport parameters to send.
Returns an error if configuration-dependent validation of the received
ClientHello message fails.
Events are appended to output.