Module Luv.Poll
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, seeLuv.Handle.close
.
val init : ?loop:Loop.t -> int -> (t, Error.t) Result.result
Allocates and initializes a polling handle.
Binds
uv_poll_init
.
val init_socket : ?loop:Loop.t -> Os_fd.Socket.t -> (t, Error.t) Result.result
Creates a polling handle for an existing socket.
Binds
uv_poll_init_socket
.
module Event : sig ... end
Binds
uv_poll_event
.
val start : t -> Event.t list -> ((Event.t list, Error.t) Result.result -> unit) -> unit
Starts polling the underlying descriptor.
Binds
uv_poll_start
.
val stop : t -> (unit, Error.t) Result.result
Stops polling.
Binds
uv_poll_stop
.