mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-17 00:00:11 +02:00
io: call tcp.set_nonblocking(true) in AsyncFd example. (#4292)
This commit is contained in:
@@ -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)?,
|
||||
/// })
|
||||
|
||||
Reference in New Issue
Block a user