net: documentation updates (#3944)

This commit is contained in:
Alice Ryhl
2021-07-13 14:23:25 +02:00
committed by GitHub
parent 7a11cfd77a
commit 8f10d81613
5 changed files with 58 additions and 58 deletions
+10 -10
View File
@@ -936,14 +936,14 @@ impl TcpStream {
.try_io(Interest::WRITABLE, || (&*self.io).write_vectored(bufs))
}
/// Try to perform IO operation from the socket using a user-provided IO operation.
/// Try to read or write from the socket using a user-provided IO operation.
///
/// If the socket is ready, the provided closure is called. The
/// closure should attempt to perform IO operation from the socket by manually calling the
/// appropriate syscall. If the operation fails because the socket is not
/// actually ready, then the closure should return a `WouldBlock` error and
/// the readiness flag is cleared. The return value of the closure is
/// then returned by `try_io`.
/// If the socket is ready, the provided closure is called. The closure
/// should attempt to perform IO operation from the socket by manually
/// calling the appropriate syscall. If the operation fails because the
/// socket is not actually ready, then the closure should return a
/// `WouldBlock` error and the readiness flag is cleared. The return value
/// of the closure is then returned by `try_io`.
///
/// If the socket is not ready, then the closure is not called
/// and a `WouldBlock` error is returned.
@@ -954,9 +954,9 @@ impl TcpStream {
/// incorrectly clear the readiness flag, which can cause the socket to
/// behave incorrectly.
///
/// The closure should not perform the read operation using any of the
/// methods defined on the Tokio `TcpStream` type, as this will mess with
/// the readiness flag and can cause the socket to behave incorrectly.
/// The closure should not perform the IO operation using any of the methods
/// defined on the Tokio `TcpStream` type, as this will mess with the
/// readiness flag and can cause the socket to behave incorrectly.
///
/// Usually, [`readable()`], [`writable()`] or [`ready()`] is used with this function.
///
+10 -10
View File
@@ -1170,14 +1170,14 @@ impl UdpSocket {
.try_io(Interest::READABLE, || self.io.recv_from(buf))
}
/// Try to perform IO operation from the socket using a user-provided IO operation.
/// Try to read or write from the socket using a user-provided IO operation.
///
/// If the socket is ready, the provided closure is called. The
/// closure should attempt to perform IO operation from the socket by manually calling the
/// appropriate syscall. If the operation fails because the socket is not
/// actually ready, then the closure should return a `WouldBlock` error and
/// the readiness flag is cleared. The return value of the closure is
/// then returned by `try_io`.
/// If the socket is ready, the provided closure is called. The closure
/// should attempt to perform IO operation from the socket by manually
/// calling the appropriate syscall. If the operation fails because the
/// socket is not actually ready, then the closure should return a
/// `WouldBlock` error and the readiness flag is cleared. The return value
/// of the closure is then returned by `try_io`.
///
/// If the socket is not ready, then the closure is not called
/// and a `WouldBlock` error is returned.
@@ -1188,9 +1188,9 @@ impl UdpSocket {
/// incorrectly clear the readiness flag, which can cause the socket to
/// behave incorrectly.
///
/// The closure should not perform the read operation using any of the
/// methods defined on the Tokio `UdpSocket` type, as this will mess with
/// the readiness flag and can cause the socket to behave incorrectly.
/// The closure should not perform the IO operation using any of the methods
/// defined on the Tokio `UdpSocket` type, as this will mess with the
/// readiness flag and can cause the socket to behave incorrectly.
///
/// Usually, [`readable()`], [`writable()`] or [`ready()`] is used with this function.
///
+10 -10
View File
@@ -1143,14 +1143,14 @@ impl UnixDatagram {
Ok((n, SocketAddr(addr)))
}
/// Try to perform IO operation from the socket using a user-provided IO operation.
/// Try to read or write from the socket using a user-provided IO operation.
///
/// If the socket is ready, the provided closure is called. The
/// closure should attempt to perform IO operation from the socket by manually calling the
/// appropriate syscall. If the operation fails because the socket is not
/// actually ready, then the closure should return a `WouldBlock` error and
/// the readiness flag is cleared. The return value of the closure is
/// then returned by `try_io`.
/// If the socket is ready, the provided closure is called. The closure
/// should attempt to perform IO operation from the socket by manually
/// calling the appropriate syscall. If the operation fails because the
/// socket is not actually ready, then the closure should return a
/// `WouldBlock` error and the readiness flag is cleared. The return value
/// of the closure is then returned by `try_io`.
///
/// If the socket is not ready, then the closure is not called
/// and a `WouldBlock` error is returned.
@@ -1161,9 +1161,9 @@ impl UnixDatagram {
/// incorrectly clear the readiness flag, which can cause the socket to
/// behave incorrectly.
///
/// The closure should not perform the read operation using any of the
/// methods defined on the Tokio `UnixDatagram` type, as this will mess with
/// the readiness flag and can cause the socket to behave incorrectly.
/// The closure should not perform the IO operation using any of the methods
/// defined on the Tokio `UnixDatagram` type, as this will mess with the
/// readiness flag and can cause the socket to behave incorrectly.
///
/// Usually, [`readable()`], [`writable()`] or [`ready()`] is used with this function.
///
+10 -10
View File
@@ -653,14 +653,14 @@ impl UnixStream {
.try_io(Interest::WRITABLE, || (&*self.io).write_vectored(buf))
}
/// Try to perform IO operation from the socket using a user-provided IO operation.
/// Try to read or write from the socket using a user-provided IO operation.
///
/// If the socket is ready, the provided closure is called. The
/// closure should attempt to perform IO operation from the socket by manually calling the
/// appropriate syscall. If the operation fails because the socket is not
/// actually ready, then the closure should return a `WouldBlock` error and
/// the readiness flag is cleared. The return value of the closure is
/// then returned by `try_io`.
/// If the socket is ready, the provided closure is called. The closure
/// should attempt to perform IO operation from the socket by manually
/// calling the appropriate syscall. If the operation fails because the
/// socket is not actually ready, then the closure should return a
/// `WouldBlock` error and the readiness flag is cleared. The return value
/// of the closure is then returned by `try_io`.
///
/// If the socket is not ready, then the closure is not called
/// and a `WouldBlock` error is returned.
@@ -671,9 +671,9 @@ impl UnixStream {
/// incorrectly clear the readiness flag, which can cause the socket to
/// behave incorrectly.
///
/// The closure should not perform the read operation using any of the
/// methods defined on the Tokio `UnixStream` type, as this will mess with
/// the readiness flag and can cause the socket to behave incorrectly.
/// The closure should not perform the IO operation using any of the methods
/// defined on the Tokio `UnixStream` type, as this will mess with the
/// readiness flag and can cause the socket to behave incorrectly.
///
/// Usually, [`readable()`], [`writable()`] or [`ready()`] is used with this function.
///
+18 -18
View File
@@ -724,14 +724,14 @@ impl NamedPipeServer {
.try_io(Interest::WRITABLE, || (&*self.io).write_vectored(buf))
}
/// Try to perform IO operation from the socket using a user-provided IO operation.
/// Try to read or write from the socket using a user-provided IO operation.
///
/// If the socket is ready, the provided closure is called. The
/// closure should attempt to perform IO operation from the socket by manually calling the
/// appropriate syscall. If the operation fails because the socket is not
/// actually ready, then the closure should return a `WouldBlock` error and
/// the readiness flag is cleared. The return value of the closure is
/// then returned by `try_io`.
/// If the socket is ready, the provided closure is called. The closure
/// should attempt to perform IO operation from the socket by manually
/// calling the appropriate syscall. If the operation fails because the
/// socket is not actually ready, then the closure should return a
/// `WouldBlock` error and the readiness flag is cleared. The return value
/// of the closure is then returned by `try_io`.
///
/// If the socket is not ready, then the closure is not called
/// and a `WouldBlock` error is returned.
@@ -742,7 +742,7 @@ impl NamedPipeServer {
/// incorrectly clear the readiness flag, which can cause the socket to
/// behave incorrectly.
///
/// The closure should not perform the read operation using any of the
/// The closure should not perform the IO operation using any of the
/// methods defined on the Tokio `NamedPipeServer` type, as this will mess with
/// the readiness flag and can cause the socket to behave incorrectly.
///
@@ -1379,14 +1379,14 @@ impl NamedPipeClient {
.try_io(Interest::WRITABLE, || (&*self.io).write_vectored(buf))
}
/// Try to perform IO operation from the socket using a user-provided IO operation.
/// Try to read or write from the socket using a user-provided IO operation.
///
/// If the socket is ready, the provided closure is called. The
/// closure should attempt to perform IO operation from the socket by manually calling the
/// appropriate syscall. If the operation fails because the socket is not
/// actually ready, then the closure should return a `WouldBlock` error and
/// the readiness flag is cleared. The return value of the closure is
/// then returned by `try_io`.
/// If the socket is ready, the provided closure is called. The closure
/// should attempt to perform IO operation from the socket by manually
/// calling the appropriate syscall. If the operation fails because the
/// socket is not actually ready, then the closure should return a
/// `WouldBlock` error and the readiness flag is cleared. The return value
/// of the closure is then returned by `try_io`.
///
/// If the socket is not ready, then the closure is not called
/// and a `WouldBlock` error is returned.
@@ -1397,9 +1397,9 @@ impl NamedPipeClient {
/// incorrectly clear the readiness flag, which can cause the socket to
/// behave incorrectly.
///
/// The closure should not perform the read operation using any of the
/// methods defined on the Tokio `NamedPipeClient` type, as this will mess with
/// the readiness flag and can cause the socket to behave incorrectly.
/// The closure should not perform the IO operation using any of the methods
/// defined on the Tokio `NamedPipeClient` type, as this will mess with the
/// readiness flag and can cause the socket to behave incorrectly.
///
/// Usually, [`readable()`], [`writable()`] or [`ready()`] is used with this function.
///