async fn first_two_free(
candidates: impl IntoIterator<Item = u16>,
) -> Option<(TcpListener, TcpListener)>Expand description
The first two loopback ports among candidates that bind, in order. Not
necessarily adjacent: an instance that started earlier may hold one in the
middle. None when fewer than two are free; nothing is left bound then.