pub struct UdpSocket<'a> {
socket: UdpSocket<'a>,
is_bound: bool,
}Available on crate feature
osal-embassy only.Expand description
UDP socket for sending and receiving datagrams.
Fields§
§socket: UdpSocket<'a>§is_bound: boolImplementations§
Trait Implementations§
Source§impl<'a> UdpSocket for UdpSocket<'a>
impl<'a> UdpSocket for UdpSocket<'a>
Source§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
Source§fn local_addr(&self) -> Result<SocketAddr, Error>
fn local_addr(&self) -> Result<SocketAddr, Error>
Returns the local address this socket is bound to.
Source§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<'a> Freeze for UdpSocket<'a>
impl<'a> !RefUnwindSafe for UdpSocket<'a>
impl<'a> !Send for UdpSocket<'a>
impl<'a> !Sync for UdpSocket<'a>
impl<'a> Unpin for UdpSocket<'a>
impl<'a> !UnwindSafe for UdpSocket<'a>
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