Trait cdns_rs::sync::network::SocketTap [−][src]
pub trait SocketTap {
fn connect(&mut self, timeout: Option<Duration>) -> CDnsResult<()>;
fn is_tcp(&self) -> bool;
fn is_conncected(&self) -> bool;
fn get_pollfd(&self) -> PollFd;
fn get_remote_addr(&self) -> &SocketAddr;
fn send(&mut self, sndbuf: &[u8]) -> CDnsResult<usize>;
fn recv(&mut self, rcvbuf: &mut [u8]) -> CDnsResult<usize>;
}
Required methods
fn is_conncected(&self) -> bool
fn is_conncected(&self) -> bool
Tells if socket/stream is connected to remote host
fn get_pollfd(&self) -> PollFd
fn get_pollfd(&self) -> PollFd
Returns the PollFd. Will panic! if instance was initialized in blocking mode.
fn get_remote_addr(&self) -> &SocketAddr
fn get_remote_addr(&self) -> &SocketAddr
Returns the remote host Ip and port.