mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 03:05:29 -05:00
compat: use Eio_unix.Stdenv.base
This commit is contained in:
parent
6c499584b8
commit
f845f1265b
4 changed files with 6 additions and 5 deletions
|
|
@ -56,7 +56,7 @@ let () =
|
|||
(* create server *)
|
||||
let server : S.t =
|
||||
S_eio.create ~port:!port_ ~max_connections:!j
|
||||
~stdenv:(stdenv :> Eio.Stdenv.t)
|
||||
~stdenv:(stdenv :> Eio_unix.Stdenv.base)
|
||||
~sw ()
|
||||
in
|
||||
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@
|
|||
(public_name tiny_httpd_eio)
|
||||
(synopsis "An EIO-based backend for Tiny_httpd")
|
||||
(flags :standard -safe-string -warn-error -a+8)
|
||||
(libraries tiny_httpd eio))
|
||||
(libraries tiny_httpd eio eio.unix))
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ type 'a with_args =
|
|||
?addr:string ->
|
||||
?port:int ->
|
||||
?max_connections:int ->
|
||||
stdenv:Eio.Stdenv.t ->
|
||||
stdenv:Eio_unix.Stdenv.base ->
|
||||
sw:Eio.Switch.t ->
|
||||
'a
|
||||
|
||||
|
|
@ -94,7 +94,8 @@ let oc_of_flow (flow : Eio.Net.stream_socket) : IO.Out_channel.t =
|
|||
{ IO.Out_channel.close; flush; output }
|
||||
|
||||
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 init_addr () = addr
|
||||
let init_port () = port
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ type 'a with_args =
|
|||
?addr:string ->
|
||||
?port:int ->
|
||||
?max_connections:int ->
|
||||
stdenv:Eio.Stdenv.t ->
|
||||
stdenv:Eio_unix.Stdenv.base ->
|
||||
sw:Eio.Switch.t ->
|
||||
'a
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue