Skip to content

Commit

Permalink
Revert "Fixes async-rs#652"
Browse files Browse the repository at this point in the history
This reverts commit a4f6806
  • Loading branch information
Noah-Kennedy committed Jan 14, 2020
1 parent a4f6806 commit 76993dd
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/net/udp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,9 @@ impl UdpSocket {
}))
}

/// Sends data on the socket to the remote address to which it is connected.
///
/// The [`connect`] method will connect this socket to a remote address.
/// This method will fail if the socket is not connected.
/// Sends data on the socket to the given address.
///
/// [`connect`]: #method.connect
/// On success, returns the number of bytes written.
///
/// # Examples
///
Expand Down Expand Up @@ -300,11 +297,12 @@ impl UdpSocket {
/// #
/// use async_std::net::UdpSocket;
///
/// let socket = UdpSocket::bind("127.0.0.1:7878").await?;
/// let socket = UdpSocket::bind("127.0.0.1:0").await?;
/// socket.connect("127.0.0.1:8080").await?;
/// let bytes = socket.send(b"Hi there!").await?;
///
/// println!("Sent {} bytes", bytes);
/// let mut buf = vec![0; 1024];
/// let n = socket.recv(&mut buf).await?;
/// println!("Received {} bytes", n);
/// #
/// # Ok(()) }) }
/// ```
Expand Down

0 comments on commit 76993dd

Please sign in to comment.