pub fn setup_outbound<CMH, RMH, L, UMH>(
    peer_manager: Arc<PeerManager<SocketDescriptor, CMH, RMH, L, UMH>>,
    their_node_id: PublicKey,
    stream: StdTcpStream
) -> impl Future<Output = ()> where
    CMH: Deref + 'static + Send + Sync,
    RMH: Deref + 'static + Send + Sync,
    L: Deref + 'static + Send + Sync,
    UMH: Deref + 'static + Send + Sync,
    CMH::Target: ChannelMessageHandler + Send + Sync,
    RMH::Target: RoutingMessageHandler + Send + Sync,
    L::Target: Logger + Send + Sync,
    UMH::Target: CustomMessageHandler + Send + Sync
Expand description

Process incoming messages and feed outgoing messages on the provided socket generated by making an outbound connection which is expected to be accepted by a peer with the given public key. The relevant processing is set to run free (via tokio::spawn).

The returned future will complete when the peer is disconnected and associated handling futures are freed, though, because all processing futures are spawned with tokio::spawn, you do not need to poll the provided future in order to make progress.