Struct kvarn::shutdown::AcceptManager
source · pub struct AcceptManager { /* private fields */ }
Expand description
A wrapper around TcpListener
(and UdpListener
when HTTP/3 comes around)
which waits for a new connection or a shutdown signal.
Implementations§
source§impl AcceptManager
impl AcceptManager
sourcepub async fn accept(&mut self, _manager: &Manager) -> AcceptAction
pub async fn accept(&mut self, _manager: &Manager) -> AcceptAction
Waits for a new connection or a shutdown signal.
Please increase the count of connections on Manager
when this connection is accepted
and decrease it when the connection dies.
sourcepub fn get_inner(&self) -> &TcpListener
pub fn get_inner(&self) -> &TcpListener
Returns a reference to the inner listener.