Skip to main content

spawn

Function spawn 

Source
pub async fn spawn(
    cfg: &StreamListenerConfig,
    balancer: Arc<Balancer>,
    idle: Duration,
    shutdown_rx: Receiver<bool>,
) -> Result<SocketAddr>
Expand description

Binds the UDP listener (fail-fast) and spawns its receive loop, returning the bound address (the OS-assigned port when cfg.port == 0).