mirror of
https://github.com/c-cube/nanoev.git
synced 2025-12-06 03:05:32 -05:00
fix
This commit is contained in:
parent
7105cf4234
commit
67a36053b0
2 changed files with 4 additions and 6 deletions
|
|
@ -290,10 +290,9 @@ open struct
|
||||||
slice.len <- 0
|
slice.len <- 0
|
||||||
end
|
end
|
||||||
|
|
||||||
let create ?enable_logging ?(masksigpipe = not Sys.win32) ?max_connections
|
let create ?(masksigpipe = not Sys.win32) ?max_connections ?(timeout = 0.0)
|
||||||
?(timeout = 0.0) ?buf_size ?(get_time_s = Unix.gettimeofday)
|
?buf_size ?(get_time_s = Unix.gettimeofday) ?(addr = "127.0.0.1")
|
||||||
?(addr = "127.0.0.1") ?(port = 8080) ?sock ?middlewares ~new_thread () :
|
?(port = 8080) ?sock ?middlewares ~new_thread () : TH.Server.t =
|
||||||
TH.Server.t =
|
|
||||||
let max_connections = get_max_connection_ ?max_connections () in
|
let max_connections = get_max_connection_ ?max_connections () in
|
||||||
let server =
|
let server =
|
||||||
{
|
{
|
||||||
|
|
@ -326,4 +325,4 @@ let create ?enable_logging ?(masksigpipe = not Sys.win32) ?max_connections
|
||||||
let tcp_server () = tcp_server_builder
|
let tcp_server () = tcp_server_builder
|
||||||
end in
|
end in
|
||||||
let backend = (module B : TH.Server.IO_BACKEND) in
|
let backend = (module B : TH.Server.IO_BACKEND) in
|
||||||
TH.Server.create_from ?enable_logging ?buf_size ?middlewares ~backend ()
|
TH.Server.create_from ?buf_size ?middlewares ~backend ()
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
module TH = Tiny_httpd_core
|
module TH = Tiny_httpd_core
|
||||||
|
|
||||||
val create :
|
val create :
|
||||||
?enable_logging:bool ->
|
|
||||||
?masksigpipe:bool ->
|
?masksigpipe:bool ->
|
||||||
?max_connections:int ->
|
?max_connections:int ->
|
||||||
?timeout:float ->
|
?timeout:float ->
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue