aboutsummaryrefslogtreecommitdiff
path: root/src/net/tcp
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2020-10-28 22:35:14 -0700
committerHaibo Huang <hhb@google.com>2020-10-28 22:35:14 -0700
commit4e8243bbb2f7f2747e80aafd270af79afebd0f38 (patch)
tree151d7c7024e57ef9eb50817b2820cbf9060b7710 /src/net/tcp
parentd5495b03381a3ebe0805db353d198b285b535b5c (diff)
downloadtokio-4e8243bbb2f7f2747e80aafd270af79afebd0f38.tar.gz
Upgrade rust/crates/tokio to 0.3.2
Test: make Change-Id: I9994ebae9b5eca9e61aede7c9a9c135749621c05
Diffstat (limited to 'src/net/tcp')
-rw-r--r--src/net/tcp/listener.rs6
-rw-r--r--src/net/tcp/stream.rs6
2 files changed, 7 insertions, 5 deletions
diff --git a/src/net/tcp/listener.rs b/src/net/tcp/listener.rs
index 3f9bca0..118dca2 100644
--- a/src/net/tcp/listener.rs
+++ b/src/net/tcp/listener.rs
@@ -177,7 +177,7 @@ impl TcpListener {
/// current task will be notified by a waker.
///
/// When ready, the most recent task that called `poll_accept` is notified.
- /// The caller is responsble to ensure that `poll_accept` is called from a
+ /// The caller is responsible to ensure that `poll_accept` is called from a
/// single task. Failing to do this could result in tasks hanging.
pub fn poll_accept(&self, cx: &mut Context<'_>) -> Poll<io::Result<(TcpStream, SocketAddr)>> {
loop {
@@ -196,14 +196,14 @@ impl TcpListener {
}
}
- /// Creates a new TCP listener from the standard library's TCP listener.
+ /// Creates new `TcpListener` from a `std::net::TcpListener`.
///
/// This function is intended to be used to wrap a TCP listener from the
/// standard library in the Tokio equivalent. The conversion assumes nothing
/// about the underlying listener; it is left up to the user to set it in
/// non-blocking mode.
///
- /// This API is typically paired with the `net2` crate and the `TcpBuilder`
+ /// This API is typically paired with the `socket2` crate and the `Socket`
/// type to build up and customize a listener before it's shipped off to the
/// backing event loop. This allows configuration of options like
/// `SO_REUSEPORT`, binding to multiple addresses, etc.
diff --git a/src/net/tcp/stream.rs b/src/net/tcp/stream.rs
index f90e9a3..204a194 100644
--- a/src/net/tcp/stream.rs
+++ b/src/net/tcp/stream.rs
@@ -145,8 +145,10 @@ impl TcpStream {
/// Creates new `TcpStream` from a `std::net::TcpStream`.
///
- /// This function will convert a TCP stream created by the standard library
- /// to a TCP stream ready to be used with the provided event loop handle.
+ /// This function is intended to be used to wrap a TCP stream from the
+ /// standard library in the Tokio equivalent. The conversion assumes nothing
+ /// about the underlying stream; it is left up to the user to set it in
+ /// non-blocking mode.
///
/// # Examples
///