package eio
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=675e67f343ccf37b965d15d1ee1c639d7a06431e8f08e95559133419f3488ee1
sha512=3d1bd0e5e0aa79d8858d83944d734a0efc325ed66a12a1506c3b36281db56c0216e6cb90a46e6021db1ea34cdd2567ebabe0bd687d9989495bb7cf6099e90ba7
doc/eio.unix/Eio_unix/FD/index.html
Module Eio_unix.FDSource
Convert between Unix.file_descr and Eio objects.
peek x is the Unix file descriptor underlying x. The caller must ensure that they do not continue to use the result after x is closed.
peek_opt x is the Unix file descriptor underlying x, if any. The caller must ensure that they do not continue to use the result after x is closed.
take x is like peek, but also marks x as closed on success (without actually closing the FD). x can no longer be used after this, and the caller is responsible for closing the FD.
take_opt x is like peek_opt, but also marks x as closed on success (without actually closing the FD). x can no longer be used after this, and the caller is responsible for closing the FD.
as_socket ~sw ~close_unix:true fd is an Eio flow that uses fd. It can be cast to e.g. Eio.source for a one-way flow. The socket object will be closed when sw finishes.