mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-07 00:00:08 +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 {
|
/// impl AsyncTcpStream {
|
||||||
/// pub fn new(tcp: TcpStream) -> io::Result<Self> {
|
/// pub fn new(tcp: TcpStream) -> io::Result<Self> {
|
||||||
|
/// tcp.set_nonblocking(true)?;
|
||||||
/// Ok(Self {
|
/// Ok(Self {
|
||||||
/// inner: AsyncFd::new(tcp)?,
|
/// inner: AsyncFd::new(tcp)?,
|
||||||
/// })
|
/// })
|
||||||
|
|||||||
Reference in New Issue
Block a user