]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/ocaml-http/http_daemon.mli
- split http_parser module (all code that parse http requests and
[helm.git] / helm / DEVEL / ocaml-http / http_daemon.mli
index 60384b26c48a28cd7e4b41d7514de3b6750a0e27..975efb894d7cf4cd3bc3f0687187a26a99048aa7 100644 (file)
@@ -91,12 +91,15 @@ val respond_with: Http_types.response -> out_channel -> unit
   receive as a first parameter the path required by the the HTTP client as a
   string, and a list of pair <parameter, value> representing parameters passed
   via GET. The last argument of the callback is an output_channel connected to
-  the HTTP client to which the user can write directly.  'timeout' parameter
-  sets a timeout for each request processed by the daemon, if it's set to None,
+  the HTTP client to which the user can write directly. 'timeout' parameter sets
+  a timeout for each request processed by the daemon, if it's set to None,
   daemon waits forever for completed requests (use with care!), default is 5
-  minute *)
+  minute. 'fork' parameter (default 'true') sets whether the daemon forks a
+  child for each request or not, if children aren't forked request are server
+  one at a time (backlog is 10) and callbacks live in the same address space of
+  the process invoking 'start' *)
 val start:
-  ?addr: string -> ?port: int -> ?timeout: int option ->
+  ?addr: string -> ?port: int -> ?timeout: int option -> ?fork: bool ->
   (string -> (string * string) list -> out_channel -> unit) ->
     unit
 
@@ -104,7 +107,7 @@ val start:
   one is an out_channel as per 'start', but the secondo one is a Request.request
   object *)
 val start':
-  ?addr: string -> ?port: int -> ?timeout: int option ->
+  ?addr: string -> ?port: int -> ?timeout: int option -> ?fork: bool ->
   (Http_types.request -> out_channel -> unit) ->
     unit