package eio
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ead3eea352dd3d7d11a81ffdbeee6ca94d5e6b3f46de264b4e59689360b3ef38
sha512=0543643da7861f533f9b7ebee8aa30a6868b48ae1e19211666a9b860e9ff8d8a9e135f214a4603d0329f2027277701f6ffd900b6fba3405a538eebc301edaf29
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.