Struct UdpSocket
pub struct UdpSocket {
socket: Option<UdpSocket>,
}Available on crate feature
osal-std only.Expand description
UDP socket for sending and receiving datagrams.
Fields§
§socket: Option<UdpSocket>Implementations§
Trait Implementations§
§impl UdpSocket for UdpSocket
impl UdpSocket for UdpSocket
§async fn bind(&mut self, address: SocketAddr) -> Result<(), Error>
async fn bind(&mut self, address: SocketAddr) -> Result<(), Error>
Binds the socket to a local address. Read more
§fn local_addr(&self) -> Result<SocketAddr, Error>
fn local_addr(&self) -> Result<SocketAddr, Error>
Returns the local address this socket is bound to.
§async fn recv_from(
&self,
buffer: &mut [u8],
) -> Result<(usize, SocketAddr), Error>
async fn recv_from( &self, buffer: &mut [u8], ) -> Result<(usize, SocketAddr), Error>
Receives a datagram. Read more
Auto Trait Implementations§
impl !Freeze for UdpSocket
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