Struct distant_core::Session [−][src]
pub struct Session { /* fields omitted */ }Expand description
Represents a session with a remote server that can be used to send requests & receive responses
Implementations
pub async fn tcp_connect<U>(addr: SocketAddr, codec: U) -> Result<Self> where
U: Codec + Send + 'static,
pub async fn tcp_connect<U>(addr: SocketAddr, codec: U) -> Result<Self> where
U: Codec + Send + 'static,
Connect to a remote TCP server using the provided information
pub async fn tcp_connect_timeout<U>(
addr: SocketAddr,
codec: U,
duration: Duration
) -> Result<Self> where
U: Codec + Send + 'static,
pub async fn tcp_connect_timeout<U>(
addr: SocketAddr,
codec: U,
duration: Duration
) -> Result<Self> where
U: Codec + Send + 'static,
Connect to a remote TCP server, timing out after duration has passed
Connect to a proxy unix socket
pub fn initialize<T, U>(transport: Transport<T, U>) -> Result<Self> where
T: DataStream,
U: Codec + Send + 'static,
pub fn initialize<T, U>(transport: Transport<T, U>) -> Result<Self> where
T: DataStream,
U: Codec + Send + 'static,
Initializes a session using the provided transport
Waits for the session to terminate, which results when the receiving end of the network connection is closed (or the session is shutdown)
Abort the session’s current connection by forcing its response task to shutdown
Clones the underlying channel for requests and returns the cloned instance