Skip to main content

run_accept_loop

Function run_accept_loop 

Source
pub async fn run_accept_loop(
    proxy: Arc<NntpProxy>,
    listener: TcpListener,
    shutdown_rx: Receiver<()>,
    routing_mode: RoutingMode,
) -> Result<()>
Expand description

Run the main accept loop for client connections

Accepts connections and spawns a task for each based on routing mode. Exits when shutdown signal is received.

ยงErrors

Returns error if listener.accept() fails