Function lightning_net_tokio::setup_inbound[][src]

pub fn setup_inbound<CMH, RMH, L: ?Sized>(
    peer_manager: Arc<PeerManager<SocketDescriptor, Arc<CMH>, Arc<RMH>, Arc<L>>>,
    stream: StdTcpStream
) -> impl Future<Output = ()> where
    CMH: ChannelMessageHandler + 'static + Send + Sync,
    RMH: RoutingMessageHandler + 'static + Send + Sync,
    L: Logger + 'static + Send + Sync
Expand description

Process incoming messages and feed outgoing messages on the provided socket generated by accepting an incoming connection.

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.