Skip to main content

serve_http_on

Function serve_http_on 

Source
pub(crate) async fn serve_http_on(
    listener: TcpListener,
    state: RuntimeState,
    shutdown_token: CancellationToken,
) -> Result<()>
Expand description

Serves an existing listener with authorization bound to its actual address.

Shutdown stops acceptance and drains HTTP requests. Upgraded WebSocket connections retain their connection permits and follow the runtime’s session shutdown.

§Errors

Returns io::Error if reading the listener address fails.