package luv

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

File descriptor polling.

See uv_poll_t — Poll handle in libuv.

type t = [ `Poll ] Handle.t

Binds uv_poll_t.

Note that values of this type can be passed to functions in Luv.Handle, in addition to the functions in this module. In particular, see Luv.Handle.close.

val init : ?loop:Loop.t -> int -> (t, Error.t) Stdlib.result

Allocates and initializes a polling handle.

Binds uv_poll_init.

val init_socket : ?loop:Loop.t -> Os_fd.Socket.t -> (t, Error.t) Stdlib.result

Creates a polling handle for an existing socket.

Binds uv_poll_init_socket.

module Event : sig ... end
val start : t -> Event.t list -> ((Event.t list, Error.t) Stdlib.result -> unit) -> unit

Starts polling the underlying descriptor.

Binds uv_poll_start.

val stop : t -> (unit, Error.t) Stdlib.result

Stops polling.

Binds uv_poll_stop.

OCaml

Innovation. Community. Security.