We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 128a6bc + fd86eff commit bce8688Copy full SHA for bce8688
src/net/udp/mod.rs
@@ -298,10 +298,11 @@ impl UdpSocket {
298
/// use async_std::net::UdpSocket;
299
///
300
/// let socket = UdpSocket::bind("127.0.0.1:0").await?;
301
+ /// socket.connect("127.0.0.1:8080").await?;
302
303
/// let mut buf = vec![0; 1024];
- /// let (n, peer) = socket.recv_from(&mut buf).await?;
304
- /// println!("Received {} bytes from {}", n, peer);
+ /// let n = socket.recv(&mut buf).await?;
305
+ /// println!("Received {} bytes", n);
306
/// #
307
/// # Ok(()) }) }
308
/// ```
0 commit comments