*)
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