Module Nanoev.Impl

type 'st ops = {
  1. clear : 'st -> unit;
  2. wakeup_from_outside : 'st -> unit;
  3. close : 'st -> Unix.file_descr -> unit;
  4. max_fds : 'st -> int;
  5. on_readable : 'a 'b. 'st -> Unix.file_descr -> 'a -> 'b -> (closed:bool -> 'a -> 'b -> unit) -> unit;
  6. on_writable : 'a 'b. 'st -> Unix.file_descr -> 'a -> 'b -> (closed:bool -> 'a -> 'b -> unit) -> unit;
  7. run_after_s : 'a 'b. 'st -> float -> 'a -> 'b -> ('a -> 'b -> unit) -> unit;
  8. step : 'st -> unit;
}

A nanoev event loop provides a set of operations on a hidden state 'st.

val build : 'a ops -> 'a -> t

Build a Nanoev.t from operations and hidden state.