mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 11:15:35 -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 *)
|
(* 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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue