package eio_luv

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type 'a t constraint 'a = [< `Poll | `Stream of [< `Pipe | `TCP | `TTY ] | `UDP ]
val is_open : 'a t -> bool

is_open t is true if close hasn't been called yet.

val close : 'a t -> unit

close t closes t.

  • raises Invalid_arg

    if t is already closed.

val to_luv : 'a t -> 'a Luv.Handle.t

to_luv t returns the wrapped handle. This allows unsafe access to the handle.

  • raises Invalid_arg

    if t is closed.

val of_luv : ?close_unix:bool -> sw:Eio.Std.Switch.t -> 'a Luv.Handle.t -> 'a t

of_luv ~sw h wraps h as an open handle. This is unsafe if h is closed directly (before or after wrapping it).

  • parameter sw

    The handle is closed when sw is released, if not closed manually first.

  • parameter close_unix

    if true (the default), calling close also closes fd.