diff --git a/embassy-net/src/udp.rs b/embassy-net/src/udp.rs index 2fdf83e9d8..c5632bb0f7 100644 --- a/embassy-net/src/udp.rs +++ b/embassy-net/src/udp.rs @@ -92,7 +92,8 @@ impl<'a> UdpSocket<'a> { } } - fn with(&self, f: impl FnOnce(&udp::Socket, &Interface) -> R) -> R { + /// Lock the stack, provide access to the underlying smoltcp UDP socket and interface + pub fn with(&self, f: impl FnOnce(&udp::Socket, &Interface) -> R) -> R { let s = &*self.stack.borrow(); let socket = s.sockets.get::(self.handle); f(socket, &s.iface)