package eio_luv

  1. Overview
  2. Docs
type 'a or_error = ('a, Luv.Error.t) Stdlib.result
exception Luv_error of Luv.Error.t
val or_raise : 'a or_error -> 'a

or_raise (Error e) raises Luv_error e.

val await_with_cancel : request: [< `File | `Addr_info | `Name_info | `Random | `Thread_pool ] Luv.Request.t -> (Luv.Loop.t -> ('a -> unit) -> unit) -> 'a

await_with_cancel ~request fn converts a function using a luv-style callback to one using effects. It sets the fiber's cancel function to cancel request, and clears it when the operation completes.

Time functions

val sleep_until : float -> unit

sleep_until time blocks until the current time is time.

DNS functions

val getaddrinfo : service:string -> string -> Eio.Net.Sockaddr.t list

getaddrinfo ~service host returns a list of IP addresses for host. host is either a domain name or an ipaddress.

Low-level wrappers for Luv functions

module File : sig ... end
module Random : sig ... end
module Handle : sig ... end
OCaml

Innovation. Community. Security.