Struct wasmedge_wasi_socket::UdpSocket
source · pub struct UdpSocket { /* private fields */ }
Implementations§
source§impl UdpSocket
impl UdpSocket
sourcepub fn bind<A: ToSocketAddrs>(addrs: A) -> Result<UdpSocket>
pub fn bind<A: ToSocketAddrs>(addrs: A) -> Result<UdpSocket>
Create UDP socket and bind to the given address.
If multiple address is given, the first successful socket is returned.
pub fn recv_from(&self, buf: &mut [u8]) -> Result<(usize, SocketAddr)>
pub fn send_to<A: ToSocketAddrs>(&self, buf: &[u8], addr: A) -> Result<usize>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for UdpSocket
impl Send for UdpSocket
impl Sync for UdpSocket
impl Unpin for UdpSocket
impl UnwindSafe for UdpSocket
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