pub trait NetConnection: Send + NetStream + AsRawFd + Debug {
    type Addr: Address;

Show 17 methods fn connect_blocking(addr: Self::Addr) -> Result<Self>
    where
        Self: Sized
; fn connect_nonblocking(addr: Self::Addr) -> Result<Self>
    where
        Self: Sized
; fn shutdown(&mut self, how: Shutdown) -> Result<()>; fn remote_addr(&self) -> Self::Addr; fn local_addr(&self) -> Self::Addr; fn set_read_timeout(&mut self, dur: Option<Duration>) -> Result<()>; fn set_write_timeout(&mut self, dur: Option<Duration>) -> Result<()>; fn read_timeout(&self) -> Result<Option<Duration>>; fn write_timeout(&self) -> Result<Option<Duration>>; fn peek(&self, buf: &mut [u8]) -> Result<usize>; fn set_nodelay(&mut self, nodelay: bool) -> Result<()>; fn nodelay(&self) -> Result<bool>; fn set_ttl(&mut self, ttl: u32) -> Result<()>; fn ttl(&self) -> Result<u32>; fn set_nonblocking(&mut self, nonblocking: bool) -> Result<()>; fn try_clone(&self) -> Result<Self>
    where
        Self: Sized
; fn take_error(&self) -> Result<Option<Error>>;
}
Expand description

Network stream is an abstraction of TCP stream object.

Required Associated Types§

Required Methods§

Implementations on Foreign Types§

Implementors§