Function convergence::server::run_background[][src]

pub async fn run_background<E: Engine>(bind: BindOptions) -> Result<u16>

Starts a server using a given engine type and set of bind options.

Returns once the server is listening for connections, with the accept loop running as a background task, and returns the listener’s local port.

Useful for creating test harnesses binding to port 0 to select a random port.