Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Http_async.ServerSourceval run_server_loop :
?error_handler:error_handler ->
Service.t ->
Shuttle.Input_channel.t ->
Shuttle.Output_channel.t ->
unit Async.Deferred.trun_server_loop accepts a HTTP service, and returns a callback that can be used to drive the server loop created via Shuttle.Connection.listen. This allows the user to customize the Input_channel and Output_channel and have control over the various Server configuration options like accept_n, backlog and more.
val run :
?where_to_listen:Async.Tcp.Where_to_listen.inet ->
?max_connections:int ->
?max_accepts_per_batch:int ->
?backlog:int ->
?socket:([ `Unconnected ], Async.Socket.Address.Inet.t) Async.Socket.t ->
?buffer_config:Buffer_config.t ->
?error_handler:error_handler ->
Service.t ->
(Async.Socket.Address.Inet.t, int) Async.Tcp.Server.t Async.Deferred.trun sets up a Tcp.Server.t and drives the HTTP server loop with the user provided Service.t.
val run_command :
?interrupt:unit Async.Deferred.t ->
?readme:(unit -> string) ->
?error_handler:error_handler ->
summary:string ->
Service.t ->
Async.Command.trun_command is similar to run but instead returns an Async.Command.t that can be used to start the async event loop from a program's entrypoint. If interrupt is provided, the server will be stopped when interrupt is fulfilled.