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

This commit is contained in:
kenmasu 2021-12-02 19:01:23 +09:00 committed by GitHub
parent 65fb0210d5
commit d764ba5816
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)?,
/// })