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