private boolean checkWhetherToConnect(final Peer peer, final boolean incoming) {
    return connectRequestSubscribers.stream()
        .anyMatch(callback -> callback.shouldConnect(peer, incoming));
  }
Connect to the peer

@param peer The peer to connect to
@return A future that will resolve to the existing or newly-established connection with this
    peer.
ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/rlpx/RlpxAgent.java