sig
type loop_flag = [ `FORKCHECK | `NOENV ]
type run_loop_flag = OneShot | NonBlock
type backend = [ `DEVPOLL | `EPOLL | `KQUEUE | `POLL | `PORT | `SELECT ]
type loop_arg =
[ `DEVPOLL
| `EPOLL
| `FORKCHECK
| `KQUEUE
| `NOENV
| `POLL
| `PORT
| `SELECT ]
type unloop_how = UnloopOne | UnloopAll
type revent =
READ
| WRITE
| IOFDSET
| TIMEOUT
| PERIODIC
| SIGNAL
| CHILD
| STAT
| IDLE
| PREPARE
| CHECK
| EMBED
| FORK
| ERROR
exception NoLoop
exception LoopInitFailed
exception VersionMismatch
exception StaleObject
type revents = Ev.revent list
type loop
type 'a ev
type 'a cb = 'a Ev.ev -> Ev.revents -> unit
type exn_handler = Ev.loop -> exn -> unit
val string_of_loop_arg : [< Ev.loop_arg ] -> string
val string_of_revent : Ev.revent -> string
external embeddable_backends : unit -> Ev.backend list
= "evo_embeddable_backends"
external supported_backends : unit -> Ev.backend list
= "evo_supported_backends"
external recommended_backends : unit -> Ev.backend list
= "evo_recommended_backends"
external default_loop : Ev.loop_arg list -> Ev.loop = "evo_default_loop"
external loop_new : Ev.loop_arg list -> Ev.loop = "evo_loop_new"
external loop_destroy : Ev.loop -> unit = "evo_loop_destroy"
external loop_now : Ev.loop -> float = "evo_loop_now"
external is_default_loop : Ev.loop -> bool = "evo_is_default_loop"
external loop_count : Ev.loop -> int = "evo_loop_count"
external loop : Ev.loop -> Ev.run_loop_flag list -> unit = "evo_loop"
external unloop : Ev.loop -> Ev.unloop_how -> unit = "evo_unloop"
external set_exn_handler : Ev.loop -> Ev.exn_handler -> unit
= "evo_set_exn_handler"
val default_exn_handler : Ev.loop -> exn -> unit
external forked : Ev.loop -> unit = "evo_forked"
external set_io_collect_interval : Ev.loop -> float -> unit
= "evo_set_io_collect_interval"
external set_timeout_collect_interval : Ev.loop -> float -> unit
= "evo_set_timeout_collect_interval"
external set_cb : 'a Ev.ev -> 'a Ev.cb -> unit = "evo_set_cb"
external get_cb : 'a Ev.ev -> 'a Ev.cb = "evo_get_cb"
val no_cb : 'a Ev.cb
external is_active : 'a Ev.ev -> bool = "evo_is_active"
external is_pending : 'a Ev.ev -> bool = "evo_is_pending"
external get_priority : 'a Ev.ev -> int = "evo_get_priority"
external set_priority : 'a Ev.ev -> int -> unit = "evo_get_priority"
external set_keepalive : 'a Ev.ev -> bool -> unit = "evo_set_keepalive"
external get_loop : 'a Ev.ev -> Ev.loop = "evo_get_loop"
external invoke : 'a Ev.ev -> Ev.revents -> unit = "evo_invoke"
external clear_pending : 'a Ev.ev -> Ev.revents = "evo_clear_pending"
external start : Ev.loop -> 'a Ev.ev -> unit = "evo_start"
external stop : 'a Ev.ev -> unit = "evo_stop"
type io
external io_init :
Unix.file_descr -> Ev.revents -> Ev.io Ev.cb -> Ev.io Ev.ev
= "evo_io_init"
type timer
external timer_init : float -> float -> Ev.timer Ev.cb -> Ev.timer Ev.ev
= "evo_timer_init"
external timer_again : Ev.timer Ev.ev -> unit = "evo_timer_again"
type periodic
type reschedule_cb = Ev.periodic Ev.ev -> float -> float
type periodic_time =
Absolute of float
| Repeating of float * float
| Manual of Ev.reschedule_cb
external periodic_init :
Ev.periodic_time -> Ev.periodic Ev.cb -> Ev.periodic Ev.ev
= "evo_periodic_init"
external periodic_set : Ev.periodic Ev.ev -> Ev.periodic_time -> unit
= "evo_periodic_set"
external periodic_get_at : Ev.periodic Ev.ev -> float
= "evo_periodic_get_at"
type signal
external signal_init : int -> Ev.signal Ev.cb -> Ev.signal Ev.ev
= "evo_signal_init"
type child
external child_init : int -> bool -> Ev.child Ev.cb -> Ev.child Ev.ev
= "evo_child_init"
external child_set : Ev.child Ev.ev -> int -> bool -> unit
= "evo_child_set"
external child_get_pid : Ev.child Ev.ev -> int = "evo_child_get_pid"
external child_get_rpid : Ev.child Ev.ev -> int = "evo_child_get_rpid"
external child_get_rstatus : Ev.child Ev.ev -> int
= "evo_child_get_rstatus"
type stat
external stat_init : string -> float -> Ev.stat Ev.cb -> Ev.stat Ev.ev
= "evo_stat_init"
external stat_set : Ev.stat Ev.ev -> string -> float -> unit
= "evo_stat_set"
external stat_get_attr : Ev.stat Ev.ev -> Unix.stats = "evo_stat_get_attr"
external stat_get_prev : Ev.stat Ev.ev -> Unix.stats = "evo_stat_get_attr"
type idle
external idle_init : Ev.idle Ev.cb -> Ev.idle Ev.ev = "evo_idle_init"
type fork
external fork_init : Ev.fork Ev.cb -> Ev.fork Ev.ev = "evo_fork_init"
type prepare
type check
external prepare_init : Ev.prepare Ev.cb -> Ev.prepare Ev.ev
= "evo_prepare_init"
external check_init : Ev.check Ev.cb -> Ev.check Ev.ev = "evo_check_init"
end