]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/ocaml-http/examples/client_address.ml
ocaml 3.09 transition
[helm.git] / helm / DEVEL / ocaml-http / examples / client_address.ml
index 0f5c68d2c4ff87798cf7ac5469317290967b87e7..79d4ff836420f5f69c91b302acd8330827cba274 100644 (file)
@@ -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
+