pub struct ListenerSocket { /* private fields */ }
Expand description
Receive all IPv4 or IPv6 packets passing through a network interface.
Implementations§
Source§impl ListenerSocket
impl ListenerSocket
pub fn new( socket_addr: SocketAddr, ip_version: IpVersion, protocol: Option<IpNextLevelProtocol>, timeout: Option<Duration>, ) -> Result<ListenerSocket>
pub fn bind(&self, addr: &SockAddr) -> Result<()>
pub fn receive_from(&self, buf: &mut Vec<u8>) -> Result<(usize, SocketAddr)>
Auto Trait Implementations§
impl Freeze for ListenerSocket
impl RefUnwindSafe for ListenerSocket
impl Send for ListenerSocket
impl Sync for ListenerSocket
impl Unpin for ListenerSocket
impl UnwindSafe for ListenerSocket
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more