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