pub fn connect_proxy<T: ToTargetAddr, P: ToSocketAddrs>(
        target: T,
        proxy: P,
        credentials: Option<(&str, &str)>,
        mempool: Arc<Mempool>,
        network: Network,
    ) -> Result<Self, CompactFiltersError> {
        let socks_stream = if let Some((username, password)) = credentials {
            Socks5Stream::connect_with_password(proxy, target, username, password)?
        } else {
            Socks5Stream::connect(proxy, target)?
        };

        Peer::from_stream(socks_stream.into_inner(), mempool, network)
    }
/// Connect to a peer through a SOCKS5 proxy, optionally by using some credentials, specified
/// as a tuple of `(username, password)`
///
/// This function internally spawns a new thread that will monitor incoming messages from the
/// peer, and optionally reply to some of them transparently, like [pings](NetworkMessage::Ping)
Connect to a peer through a SOCKS5 proxy, optionally by using some credentials, specified
as a tuple of `(username, password)`

This function internally spawns a new thread that will monitor incoming messages from the
peer, and optionally reply to some of them transparently, like [pings](NetworkMessage::Ping)
Connect to a peer through a SOCKS5 proxy optionally by using some credentials specified as a tuple of ` ( username password ) ` This function internally spawns a new thread that will monitor incoming messages from the peer and optionally reply to some of them transparently like [ pings ] ( NetworkMessage :: Ping )
pub fn connect_proxy<T: ToTargetAddr, P: ToSocketAddrs>(
        target: T,
        proxy: P,
        credentials: Option<(&str, &str)>,
        mempool: Arc<Mempool>,
        network: Network,
    ) -> Result<Self, CompactFiltersError> {
        let socks_stream = if let Some((username, password)) = credentials {
            Socks5Stream::connect_with_password(proxy, target, username, password)?
        } else {
            Socks5Stream::connect(proxy, target)?
        };
        Peer::from_stream(socks_stream.into_inner(), mempool, network)
    }
pub fn connect_proxy < T : ToTargetAddr , P : ToSocketAddrs > ( target : T , proxy : P , credentials : Option < ( & str , & str ) > , mempool : Arc < Mempool > , network : Network , ) -> Result < Self , CompactFiltersError > { let socks_stream = if let Some ( ( username , password ) ) = credentials { Socks5Stream :: connect_with_password ( proxy , target , username , password ) ? } else { Socks5Stream :: connect ( proxy , target ) ? } ; Peer :: from_stream ( socks_stream . into_inner ( ) , mempool , network ) }
Connect to a peer through a SOCKS5 proxy, optionally by using some credentials, specified
as a tuple of `(username, password)`
Connect to a peer through a SOCKS5 proxy optionally by using some credentials specified as a tuple of ` ( username password ) `
target
T
proxy
P
credentials
Option<(&str, &str)>
mempool
Arc<Mempool>
network
Network
target
T
proxy
P
credentials
Option<(&str, &str)>
mempool
Arc<Mempool>
network
Network