pub struct UdpSocketHandle { /* private fields */ }Expand description
A bound UDP port on the userspace stack. Connectionless: [recv] yields
whole datagrams and [send_to] sends to a peer port. Dropping it unbinds
the port.
Implementations§
Source§impl UdpSocketHandle
impl UdpSocketHandle
Sourcepub fn local_port(&self) -> u16
pub fn local_port(&self) -> u16
The local port datagrams are received on (and the source port of sends).
Sourcepub async fn recv(&self) -> Result<UdpDatagram, Error>
pub async fn recv(&self) -> Result<UdpDatagram, Error>
Await the next inbound datagram. Returns BrokenPipe if the stack closed.
Trait Implementations§
Source§impl Debug for UdpSocketHandle
impl Debug for UdpSocketHandle
Source§impl Drop for UdpSocketHandle
impl Drop for UdpSocketHandle
Auto Trait Implementations§
impl !Freeze for UdpSocketHandle
impl !RefUnwindSafe for UdpSocketHandle
impl !UnwindSafe for UdpSocketHandle
impl Forget for UdpSocketHandle
impl Move for UdpSocketHandle
impl Send for UdpSocketHandle
impl Sync for UdpSocketHandle
impl Unpin for UdpSocketHandle
impl UnsafeUnpin for UdpSocketHandle
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