Skip to main content

ready_peer_count

Function ready_peer_count 

Source
pub(crate) async fn ready_peer_count(
    address_book_service: &Buffer<BoxService<AddressBookRequest, AddressBookResponse, BoxError>, AddressBookRequest>,
) -> usize
Expand description

Returns the number of candidate peers that are currently ready for a connection attempt, as selected by next_reconnect_peer.

The returned count is a snapshot: candidates can become ready or be attempted by other tasks immediately afterwards.