#[non_exhaustive]pub enum ServerHandshake {
NeedsInput(NeedsInput<ServerSide>),
Accepted(Accepted<Quic>),
VerifyClientIdentity(VerifyPeerIdentity<ServerSide, Quic>),
Complete(Connection<ServerSide, Quic>),
}Expand description
An in-progress QUIC server handshake.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NeedsInput(NeedsInput<ServerSide>)
More data needs to be received to make progress.
Accepted(Accepted<Quic>)
A complete ClientHello has been received.
The handshake can be progressed by choosing a ServerConfig based on
Accepted::client_hello() and providing it to Accepted::choose_config().
VerifyClientIdentity(VerifyPeerIdentity<ServerSide, Quic>)
The client’s presented identity must be verified.
See VerifyPeerIdentity<ServerSide, Quic> for how to proceed.
Complete(Connection<ServerSide, Quic>)
The handshake is complete.
Implementations§
Source§impl ServerHandshake
impl ServerHandshake
Sourcepub fn start(version: Version) -> NeedsInput<ServerSide>
pub fn start(version: Version) -> NeedsInput<ServerSide>
Creates a new QUIC ServerHandshake via the payload of the ServerHandshake::NeedsInput variant.
It is a fundamental fact of server TLS connections that the server reads first; this is reflected in the returned type.
You may wrap this in the ServerHandshake::NeedsInput variant to generalise the type to a
ServerHandshake.
The returned object should be fed data from a single potential client.