pub async fn connect_outbound<CMH: ChannelMessageHandler + 'static>(peer_manager: Arc<peer_handler::PeerManager<SocketDescriptor, Arc<CMH>>>, event_notify: mpsc::Sender<()>, their_node_id: PublicKey, addr: SocketAddr) {
		let connect_timeout = time::delay_for(Duration::from_secs(10));
		let connect_fut = TcpStream::connect(&addr);
		tokio::select! {
			_ = connect_timeout => { },
			res = connect_fut => {
				if let Ok(stream) = res {
					Connection::setup_outbound(peer_manager, event_notify, their_node_id, stream).await;
				}
			},
		};
	}
/// 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).
///
/// You should poll the Receive end of event_notify and call get_and_clear_pending_events() on
/// ChannelManager and ChannelMonitor objects.
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).

You should poll the Receive end of event_notify and call get_and_clear_pending_events() on
ChannelManager and ChannelMonitor objects.
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 ) . You should poll the Receive end of event_notify and call get_and_clear_pending_events () on ChannelManager and ChannelMonitor objects .
pub async fn connect_outbound<CMH: ChannelMessageHandler + 'static>(peer_manager: Arc<peer_handler::PeerManager<SocketDescriptor, Arc<CMH>>>, event_notify: mpsc::Sender<()>, their_node_id: PublicKey, addr: SocketAddr) {
		let connect_timeout = time::delay_for(Duration::from_secs(10));
		let connect_fut = TcpStream::connect(&addr);
		tokio::select! {
			_ = connect_timeout => { },
			res = connect_fut => {
				if let Ok(stream) = res {
					Connection::setup_outbound(peer_manager, event_notify, their_node_id, stream).await;
				}
			},
		};
	}
pub async fn connect_outbound < CMH : ChannelMessageHandler + ' static > ( peer_manager : Arc < peer_handler :: PeerManager < SocketDescriptor , Arc < CMH > > > , event_notify : mpsc :: Sender < ( ) > , their_node_id : PublicKey , addr : SocketAddr ) { let connect_timeout = time :: delay_for ( Duration :: from_secs ( 10 ) ) ; let connect_fut = TcpStream :: connect ( & addr ) ; tokio :: select ! { connect_timeout { } res connect_fut { if let Ok ( stream ) res { Connection setup_outbound ( peer_manager event_notify their_node_id stream ) await } } } ; }
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).
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 ) .
peer_manager
Arc<peer_handler::PeerManager<SocketDescriptor, Arc<CMH>>>
event_notify
mpsc::Sender<()>
their_node_id
PublicKey
addr
SocketAddr
peer_manager
Arc<peer_handler::PeerManager<SocketDescriptor, Arc<CMH>>>
event_notify
mpsc::Sender<()>
their_node_id
PublicKey
addr
SocketAddr