Struct xenet_socket::ListenerSocket
source · 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 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