pub struct TlsConfig { /* private fields */ }Expand description
Handshake timeout shared by TLS acceptor and connector services.
Acceptors obtain this value from the accepted connection’s I/O configuration;
connectors obtain it from their ntex_service::cfg::SharedCfg service state.
The timeout covers TLS negotiation, not the underlying TCP connection attempt
or the lifetime of an established connection.
This does not configure certificates, verification, ALPN, or protocol versions. Use the selected backend’s configuration for those settings.
Implementations§
Source§impl TlsConfig
impl TlsConfig
Sourcepub fn handshake_timeout(&self) -> Millis
pub fn handshake_timeout(&self) -> Millis
Returns the handshake timeout; zero means no handshake deadline.
Sourcepub fn set_handshake_timeout<T>(self, timeout: T) -> TlsConfig
pub fn set_handshake_timeout<T>(self, timeout: T) -> TlsConfig
Sets the handshake timeout using a duration convertible to seconds.
Use Seconds::ZERO to disable the deadline. Expiration is reported as
std::io::ErrorKind::TimedOut, wrapped in a connector error when applicable.
The default is five seconds. Low-level handshake functions do not consult this configuration unless their documentation explicitly says otherwise.