pub async fn connect_outbound<CMH, RMH, OMH, L, UMH>(
    peer_manager: Arc<PeerManager<SocketDescriptor, CMH, RMH, OMH, L, UMH>>,
    their_node_id: PublicKey,
    addr: SocketAddr
) -> Option<impl Future<Output = ()>>where
    CMH: Deref + 'static + Send + Sync,
    RMH: Deref + 'static + Send + Sync,
    OMH: Deref + 'static + Send + Sync,
    L: Deref + 'static + Send + Sync,
    UMH: Deref + 'static + Send + Sync,
    CMH::Target: ChannelMessageHandler + Send + Sync,
    RMH::Target: RoutingMessageHandler + Send + Sync,
    OMH::Target: OnionMessageHandler + Send + Sync,
    L::Target: Logger + Send + Sync,
    UMH::Target: CustomMessageHandler + Send + Sync,
Expand description

Process incoming messages and feed outgoing messages on a new connection made to the given socket address which is expected to be accepted by a peer with the given public key (by scheduling futures with tokio::spawn).

Shorthand for TcpStream::connect(addr) with a timeout followed by setup_outbound().

Returns a future (as the fn is async) which needs to be polled to complete the connection and connection setup. That future then returns a future which will complete when the peer is disconnected and associated handling futures are freed, though, because all processing in said futures are spawned with tokio::spawn, you do not need to poll the second future in order to make progress.