X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Focaml-http%2Fexamples%2Fclient_address.ml;h=79d4ff836420f5f69c91b302acd8330827cba274;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=75719111e799a06ad9c0472eab24c8dd15d86881;hpb=9d746b8bd108a349f3d4771adbc3b293f191e282;p=helm.git diff --git a/helm/DEVEL/ocaml-http/examples/client_address.ml b/helm/DEVEL/ocaml-http/examples/client_address.ml index 75719111e..79d4ff836 100644 --- a/helm/DEVEL/ocaml-http/examples/client_address.ml +++ b/helm/DEVEL/ocaml-http/examples/client_address.ml @@ -2,7 +2,7 @@ (* OCaml HTTP - do it yourself (fully OCaml) HTTP daemon - Copyright (C) <2002> Stefano Zacchiroli + Copyright (C) <2002-2004> Stefano Zacchiroli This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,7 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *) -open Printf;; +open Printf +open Http_types let callback req outchan = let body = @@ -30,5 +31,12 @@ let callback req outchan = in let res = new Http_response.response ~body () in Http_daemon.respond_with res outchan -in -Http_daemon.start' ~port:9999 callback + +let spec = + { Http_daemon.default_spec with + callback = callback; + port = 9999 + } + +let _ = Http_daemon.main spec +