io: call tcp.set_nonblocking(true) in AsyncFd example. (#4292)

This commit is contained in:
kenmasu
2021-12-02 11:01:23 +01:00
committed by GitHub
parent 65fb0210d5
commit d764ba5816
+1
View File
@@ -81,6 +81,7 @@ use std::{task::Context, task::Poll};
///
/// impl AsyncTcpStream {
/// pub fn new(tcp: TcpStream) -> io::Result<Self> {
/// tcp.set_nonblocking(true)?;
/// Ok(Self {
/// inner: AsyncFd::new(tcp)?,
/// })