pub struct ServerSide { /* private fields */ }Expand description
State associated with a server connection.
Implementations§
Source§impl ServerSide
impl ServerSide
Sourcepub fn received_resumption_data(&self) -> Option<&[u8]>
pub fn received_resumption_data(&self) -> Option<&[u8]>
Retrieves the resumption data supplied by the client, if any.
Returns Some if and only if a valid resumption ticket has been received from the client.
Sourcepub fn server_name(&self) -> Option<&DnsName<'static>>
pub fn server_name(&self) -> Option<&DnsName<'static>>
Retrieves the server name, if any, used to select the certificate and private key.
This returns None until some time after the client’s server name indication
(SNI) extension value is processed during the handshake. It will never be
None when the connection is ready to send or process application data,
unless the client does not support SNI.
This is useful for application protocols that need to enforce that the
server name matches an application layer protocol hostname. For
example, HTTP/1.1 servers commonly expect the Host: header field of
every request on a connection to match the hostname in the SNI extension
when the client provides the SNI extension.
The server name is also used to match sessions during session resumption.