Function next_conn

Source
pub async fn next_conn(
    listener: &TcpListener,
    conn_limit: usize,
    conn_set: &mut JoinSet<()>,
) -> Result<(TcpStream, SocketAddr)>
Expand description

Accept and return the next TCP stream connection.

If we’re at the connection limit, this first awaits for a connection task to become available.