Skip to main content

build_acceptor

Function build_acceptor 

Source
pub fn build_acceptor(
    tls: &TlsConfig,
    http2_enabled: bool,
) -> Result<TlsAcceptor, TlsError>
Expand description

Builds a [TlsAcceptor] ready to wrap accepted TCP streams. Fail-fast: any cert/key/config error surfaces here at startup.

The listeners use build_reloadable + current_acceptor so certs can hot-reload; this one-shot form is kept for tests and simple embedding.