package eio

  1. Overview
  2. Docs

Eio resources backed by an OS file descriptor.

type t = < fd : Fd.t >

Resources that have FDs are sub-types of t.

val fd : < t.. > -> Fd.t

fd t returns the FD being wrapped by a resource.

type Eio.Generic.ty +=
  1. | FD : Fd.t Eio.Generic.ty
    (*

    Resources that wrap FDs can handle this in their probe method to expose the FD.

    *)
val fd_opt : Eio.Generic.t -> Fd.t option

fd_opt t returns the FD being wrapped by a generic resource, if any.

This just probes t using FD.

OCaml

Innovation. Community. Security.