ARXVO5XAQFZR3X6MXW525Z6WXUYUHRJUGTTNCEKKXRAKQQBG5ZXAC
WGRFJRTEXOKY7PV536O62WUE32T24VQEHFQP67GEZZ67AE37ZWUAC
3SPNKI46URBW4PD3JRMBV5YV5W56N3SFUTK25VQEF2FUZ64ZDQPAC
DBKKKHC2ER7XAYR6HAFQ6I75M3OLDOSGCB5BTEP7X6XAZRSWKIRAC
HVFBGX2A2LBL6HSFKPNIG5KGQPVMZ5GFYJ4ZPDAM4POSRTQSKN7QC
AMTMTTJTF2XHEUC6ACP2PHP7GAFMFZRSJ47VJBKEO22X4ZGFIX7QC
AOJXTWBZA2DQBFTJZX2YTGAKIB62SKTEVJ7RRIBJNDSMC75DDQVQC
ONQEIR5BV26QJSI3HY7B3MN6VWEGSZIXAIUIANJ5ZLR3QN3DFGEAC
pub(crate) fn connect<V: Default + ServerCertVerifier + 'static>(
pub trait Network {
type Error;
type Connection: Read + Write;
fn connect(url: &Url) -> Result<Self::Connection, Self::Error>;
}
pub struct TcpNetwork<V>(V, !);
impl<V: ServerCertVerifier + Default + 'static> Network for TcpNetwork<V> {
type Error = !;
type Connection = rustls::StreamOwned<ClientConnection, TcpStream>;
fn connect(url: &Url) -> Result<Self::Connection, Self::Error> {
Ok(connect::<V>(&url))
}
}
fn connect<V: Default + ServerCertVerifier + 'static>(
use rustls::ClientConnection;
use std::{
io::{BufReader, Read, Result as ioResult, Write},
net::TcpStream,
};
use server::{Network, TcpNetwork};
use std::io::{BufReader, Read, Result as ioResult, Write};