paf

HTTP/AF and MirageOS
Library paf
Module Paf
module type RUNTIME = sig ... end
type 'conn runtime = (module RUNTIME with type t = 'conn)
type impl =
| Runtime : 'conn runtime * 'conn -> impl
type sleep = int64 -> unit Lwt.t
val server : 'conn runtime -> sleep:sleep -> 'conn -> Mimic.flow -> unit Lwt.t
val run : 'conn runtime -> sleep:sleep -> 'conn -> Mimic.flow -> unit Lwt.t
type 't service
val service : ( 'flow -> ( Mimic.flow * impl, 'error ) result Lwt.t ) -> ( 't -> ( 'flow, [> `Closed ] as 'error ) result Lwt.t ) -> ( 't -> unit Lwt.t ) -> 't service
val serve : sleep:sleep -> ?stop:Lwt_switch.t -> 't service -> 't -> [ `Initialized of unit Lwt.t ]