mirror of
https://github.com/c-cube/nanoev.git
synced 2025-12-06 03:05:32 -05:00
head middlewares
This commit is contained in:
parent
f7c3a14b1e
commit
b6583d69a8
2 changed files with 4 additions and 2 deletions
|
|
@ -262,7 +262,7 @@ end
|
||||||
let create ?enable_logging ?(masksigpipe = not Sys.win32) ?max_connections
|
let create ?enable_logging ?(masksigpipe = not Sys.win32) ?max_connections
|
||||||
?max_buf_pool_size ?(timeout = 0.0) ?buf_size
|
?max_buf_pool_size ?(timeout = 0.0) ?buf_size
|
||||||
?(get_time_s = Unix.gettimeofday) ?(addr = "127.0.0.1") ?(port = 8080) ?sock
|
?(get_time_s = Unix.gettimeofday) ?(addr = "127.0.0.1") ?(port = 8080) ?sock
|
||||||
?middlewares ~new_thread () : TH.Server.t =
|
?head_middlewares ?middlewares ~new_thread () : TH.Server.t =
|
||||||
let max_connections = get_max_connection_ ?max_connections () in
|
let max_connections = get_max_connection_ ?max_connections () in
|
||||||
let max_pool_size =
|
let max_pool_size =
|
||||||
match max_buf_pool_size with
|
match max_buf_pool_size with
|
||||||
|
|
@ -300,4 +300,5 @@ 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 ?enable_logging ?buf_size ?head_middlewares ?middlewares
|
||||||
|
~backend ()
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ val create :
|
||||||
?addr:string ->
|
?addr:string ->
|
||||||
?port:int ->
|
?port:int ->
|
||||||
?sock:Unix.file_descr ->
|
?sock:Unix.file_descr ->
|
||||||
|
?head_middlewares:TH.Server.Head_middleware.t list ->
|
||||||
?middlewares:([ `Encoding | `Stage of int ] * TH.Server.Middleware.t) list ->
|
?middlewares:([ `Encoding | `Stage of int ] * TH.Server.Middleware.t) list ->
|
||||||
new_thread:((unit -> unit) -> unit) ->
|
new_thread:((unit -> unit) -> unit) ->
|
||||||
unit ->
|
unit ->
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue