]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/ocaml-http/examples/dont_fork.ml
first moogle template checkin
[helm.git] / helm / DEVEL / ocaml-http / examples / dont_fork.ml
index 8d8eb45ccdec087789e8017d5b74f4875fc96031..d0e1d91e61531ce49d7fefb774a4348801932915 100644 (file)
@@ -20,9 +20,6 @@
 *)
 
 let callback req outchan =
-  output_string outchan "FOO\n";
-  flush outchan;
-  Unix.sleep 5;
-  Http_daemon.respond_error ~body:"AH AH AH :-P" outchan
+  Http_daemon.respond_error ~body:"AH AH AH :-P\n" outchan
 in
-Http_daemon.start' ~port:9999 ~fork:false callback
+Http_daemon.start' ~port:9999 ~mode:`Single ~timeout:(Some 5) callback