compat: use Eio_unix.Stdenv.base

This commit is contained in:
Simon Cruanes 2023-06-08 00:23:59 -04:00
parent 6c499584b8
commit f845f1265b
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
4 changed files with 6 additions and 5 deletions

View file

@ -56,7 +56,7 @@ let () =
(* create server *) (* create server *)
let server : S.t = let server : S.t =
S_eio.create ~port:!port_ ~max_connections:!j S_eio.create ~port:!port_ ~max_connections:!j
~stdenv:(stdenv :> Eio.Stdenv.t) ~stdenv:(stdenv :> Eio_unix.Stdenv.base)
~sw () ~sw ()
in in

View file

@ -4,5 +4,5 @@
(public_name tiny_httpd_eio) (public_name tiny_httpd_eio)
(synopsis "An EIO-based backend for Tiny_httpd") (synopsis "An EIO-based backend for Tiny_httpd")
(flags :standard -safe-string -warn-error -a+8) (flags :standard -safe-string -warn-error -a+8)
(libraries tiny_httpd eio)) (libraries tiny_httpd eio eio.unix))

View file

@ -7,7 +7,7 @@ type 'a with_args =
?addr:string -> ?addr:string ->
?port:int -> ?port:int ->
?max_connections:int -> ?max_connections:int ->
stdenv:Eio.Stdenv.t -> stdenv:Eio_unix.Stdenv.base ->
sw:Eio.Switch.t -> sw:Eio.Switch.t ->
'a 'a
@ -94,7 +94,8 @@ let oc_of_flow (flow : Eio.Net.stream_socket) : IO.Out_channel.t =
{ IO.Out_channel.close; flush; output } { IO.Out_channel.close; flush; output }
let io_backend ?(addr = "127.0.0.1") ?(port = 8080) ?max_connections let io_backend ?(addr = "127.0.0.1") ?(port = 8080) ?max_connections
~(stdenv : Eio.Stdenv.t) ~(sw : Eio.Switch.t) () : (module H.IO_BACKEND) = ~(stdenv : Eio_unix.Stdenv.base) ~(sw : Eio.Switch.t) () :
(module H.IO_BACKEND) =
let module M = struct let module M = struct
let init_addr () = addr let init_addr () = addr
let init_port () = port let init_port () = port

View file

@ -4,7 +4,7 @@ type 'a with_args =
?addr:string -> ?addr:string ->
?port:int -> ?port:int ->
?max_connections:int -> ?max_connections:int ->
stdenv:Eio.Stdenv.t -> stdenv:Eio_unix.Stdenv.base ->
sw:Eio.Switch.t -> sw:Eio.Switch.t ->
'a 'a