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§
Sourcefn is_conncected(&self) -> bool
fn is_conncected(&self) -> bool
Tells if socket/stream is connected to remote host
Sourcefn get_fd(&self) -> Option<BorrowedFd<'_>>
fn get_fd(&self) -> Option<BorrowedFd<'_>>
Returns the raw fd of the socket.
Sourcefn get_remote_addr(&self) -> &SocketAddr
fn get_remote_addr(&self) -> &SocketAddr
Returns the remote host Ip and port.