package eio_luv

  1. Overview
  2. Docs

Eio backend using libuv.

You will normally not use this module directly. Instead, use Eio_main.run to start an event loop and then use the API in the Eio module.

However, it is possible to use this module directly if you only want to support libuv.

type Eio.Exn.Backend.t +=
  1. | Luv_error of Luv.Error.t
  2. | Outside_sandbox of string * string
  3. | Absolute_path
module Low_level : sig ... end

Eio API

type has_fd = < fd : Low_level.File.t >
type source = < Eio.Flow.source ; Eio.Flow.close ; has_fd >
type sink = < Eio.Flow.sink ; Eio.Flow.close ; has_fd >
type stdenv = < stdin : source ; stdout : sink ; stderr : sink ; net : Eio.Net.t ; domain_mgr : Eio.Domain_manager.t ; clock : Eio.Time.clock ; mono_clock : Eio.Time.Mono.t ; fs : Eio.Fs.dir Eio.Path.t ; cwd : Eio.Fs.dir Eio.Path.t ; secure_random : Eio.Flow.source ; debug : Eio.Debug.t >
val get_fd : < has_fd.. > -> Low_level.File.t
val get_fd_opt : Eio.Generic.t -> Low_level.File.t option

Main Loop

val run : (stdenv -> 'a) -> 'a