]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/ocaml-http/http_misc.ml
added 'build_sockaddr'
[helm.git] / helm / DEVEL / ocaml-http / http_misc.ml
index edacea23ac833d1d41e72f244efc0db0b5e7b28f..8117c540bbac3227ab8bf9c2166a4d4dfd0ae4a3 100644 (file)
@@ -97,3 +97,6 @@ let reason_phrase_of_code = function
   | 505 -> "HTTP version not supported"
   | invalid_code -> raise (Invalid_code invalid_code)
 
+let build_sockaddr ~addr ~port =
+  Unix.ADDR_INET (Unix.inet_addr_of_string addr, port)
+