Trait SocketTapCommon

Source
pub trait SocketTapCommon {
    // Required methods
    fn is_conncected(&self) -> bool;
    fn get_fd(&self) -> Option<BorrowedFd<'_>>;
    fn get_remote_addr(&self) -> &SocketAddr;
}
Expand description

A common items for bot sync and async. Shhould be implemented by each instance.

Required Methods§

Source

fn is_conncected(&self) -> bool

Tells if socket/stream is connected to remote host

Source

fn get_fd(&self) -> Option<BorrowedFd<'_>>

Returns the raw fd of the socket.

Source

fn get_remote_addr(&self) -> &SocketAddr

Returns the remote host Ip and port.

Implementors§

Source§

impl<T: AsFd, LOC> SocketTapCommon for NetworkTap<T, LOC>