Function tokio_anyfd::anyfd[][src]

pub fn anyfd<T: AsRawFd>(fd: T) -> Result<Anyfd<T>>
Expand description

Wrap any suitable file descriptor fd as AsyncRead and AsyncWrite.

You need to make sure the file descriptor is non-blocking. Set it with set_nonblocking if not already.