mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 22:32:29 +00:00
fixup! net/udp: Relay full UdpMetadata instead of only remote endpoint in poll_ functions
This commit is contained in:
parent
7f1bedcee0
commit
8fe88847d8
@ -111,10 +111,8 @@ impl<'a> UdpSocket<'a> {
|
||||
/// This method will wait until a datagram is received.
|
||||
///
|
||||
/// Returns the number of bytes received and the remote endpoint.
|
||||
pub async fn recv_from(&self, buf: &mut [u8]) -> Result<(usize, IpEndpoint), RecvError> {
|
||||
poll_fn(move |cx| self.poll_recv_from(buf, cx))
|
||||
.await
|
||||
.map(|(size, metadata)| (size, metadata.endpoint))
|
||||
pub async fn recv_from(&self, buf: &mut [u8]) -> Result<(usize, UdpMetadata), RecvError> {
|
||||
poll_fn(move |cx| self.poll_recv_from(buf, cx)).await
|
||||
}
|
||||
|
||||
/// Receive a datagram.
|
||||
|
Loading…
Reference in New Issue
Block a user