Trait distant_net::TcpClientExt
source · [−]pub trait TcpClientExt<T, U> where
T: Serialize + Send + Sync,
U: DeserializeOwned + Send + Sync, {
fn connect<'async_trait, C>(
addr: SocketAddr,
codec: C
) -> Pin<Box<dyn Future<Output = Result<Client<T, U>>> + Send + 'async_trait>>
where
C: Codec + Send + 'static,
C: 'async_trait;
fn connect_timeout<'async_trait, C>(
addr: SocketAddr,
codec: C,
duration: Duration
) -> Pin<Box<dyn Future<Output = Result<Client<T, U>>> + Send + 'async_trait>>
where
C: Codec + Send + 'static,
C: 'async_trait,
Self: Send + 'async_trait,
{ ... }
}
Required Methods
Provided Methods
Connect to a remote TCP server, timing out after duration has passed