Struct distant_net::common::TcpTransport
source · pub struct TcpTransport { /* private fields */ }Expand description
Represents a Transport that leverages a TCP stream
Implementations
sourceimpl TcpTransport
impl TcpTransport
sourcepub async fn connect(addrs: impl ToSocketAddrs) -> Result<Self>
pub async fn connect(addrs: impl ToSocketAddrs) -> Result<Self>
Creates a new stream by connecting to a remote machine at the specified IP address and port
Trait Implementations
sourceimpl Debug for TcpTransport
impl Debug for TcpTransport
sourceimpl Reconnectable for TcpTransport
impl Reconnectable for TcpTransport
sourceimpl Transport for TcpTransport
impl Transport for TcpTransport
sourcefn try_read(&self, buf: &mut [u8]) -> Result<usize>
fn try_read(&self, buf: &mut [u8]) -> Result<usize>
Tries to read data from the transport into the provided buffer, returning how many bytes
were read. Read more
Auto Trait Implementations
impl RefUnwindSafe for TcpTransport
impl Send for TcpTransport
impl Sync for TcpTransport
impl Unpin for TcpTransport
impl UnwindSafe for TcpTransport
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more