X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Focaml-http%2Fexamples%2Falways_ok_daemon.ml;h=caa0d4516fe427e8dbd1691e0b2ece1f5ce88186;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=d5d456d7481d9a22488c4802dcadb2168775ab4f;hpb=2228717a5f41aab3b157713e40753016ad46c2ae;p=helm.git diff --git a/helm/DEVEL/ocaml-http/examples/always_ok_daemon.ml b/helm/DEVEL/ocaml-http/examples/always_ok_daemon.ml index d5d456d74..caa0d4516 100644 --- a/helm/DEVEL/ocaml-http/examples/always_ok_daemon.ml +++ b/helm/DEVEL/ocaml-http/examples/always_ok_daemon.ml @@ -19,8 +19,15 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *) -open Http_daemon;; +open Http_types + (* start an http daemon that alway respond with a 200 status code and an empty content *) -start ~port:9999 ~addr:"localhost" (fun _ _ outchan -> respond outchan) +let spec = + { Http_daemon.default_spec with + callback = (fun _ outchan -> Http_daemon.respond outchan); + port = 9999; + } + +let _ = Http_daemon.main spec