[][src]Function tokio_anyfd::anyfd

pub fn anyfd(fd: RawFd) -> Result<PollEvented<Anyfd>>

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.