pub struct TlsAcceptor { /* private fields */ }Expand description
Upgrades existing I/O connections to server-side TLS using rustls.
Reads TlsConfig from each connection’s configuration. Readiness observes
the shared per-thread soft limit set by crate::max_concurrent_ssl_accept;
it does not reserve a handshake slot. Calling the service holds a slot until
the handshake completes, fails, times out, or is cancelled.
Existing I/O filters remain below the returned TlsServerFilter.
Implementations§
Source§impl TlsAcceptor
impl TlsAcceptor
Sourcepub fn new(cfg: Arc<ServerConfig>) -> TlsAcceptor
pub fn new(cfg: Arc<ServerConfig>) -> TlsAcceptor
Creates an acceptor using the supplied rustls server configuration.
Captures the current thread’s handshake counter; the timeout is resolved separately for each accepted connection.
Trait Implementations§
Source§impl Debug for TlsAcceptor
impl Debug for TlsAcceptor
Source§impl From<ServerConfig> for TlsAcceptor
impl From<ServerConfig> for TlsAcceptor
Source§fn from(cfg: ServerConfig) -> TlsAcceptor
fn from(cfg: ServerConfig) -> TlsAcceptor
Source§impl<F, St> Service<St, Io<F>> for TlsAcceptorwhere
F: Filter,
impl<F, St> Service<St, Io<F>> for TlsAcceptorwhere
F: Filter,
Source§fn bind(&self, ctx: BindCtx<'_>)
fn bind(&self, ctx: BindCtx<'_>)
Registers capacity-change notifications with the service readiness scope.
Source§async fn ready(
&self,
_: Ctx<'_, TlsAcceptor, St>,
) -> Result<(), <TlsAcceptor as Service<St, Io<F>>>::Error>
async fn ready( &self, _: Ctx<'_, TlsAcceptor, St>, ) -> Result<(), <TlsAcceptor as Service<St, Io<F>>>::Error>
Waits for spare capacity without reserving it.
Source§async fn call(
&self,
io: Io<F>,
_: Ctx<'_, TlsAcceptor, St>,
) -> Result<<TlsAcceptor as Service<St, Io<F>>>::Res, <TlsAcceptor as Service<St, Io<F>>>::Error>
async fn call( &self, io: Io<F>, _: Ctx<'_, TlsAcceptor, St>, ) -> Result<<TlsAcceptor as Service<St, Io<F>>>::Res, <TlsAcceptor as Service<St, Io<F>>>::Error>
Counts this handshake and applies the timeout from the connection’s registry.