]> matita.cs.unibo.it Git - helm.git/commitdiff
added 'build_sockaddr'
authorStefano Zacchiroli <zack@upsilon.cc>
Fri, 6 Dec 2002 16:40:26 +0000 (16:40 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Fri, 6 Dec 2002 16:40:26 +0000 (16:40 +0000)
helm/DEVEL/ocaml-http/http_misc.ml
helm/DEVEL/ocaml-http/http_misc.mli

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)
+
index f12e9ad0de0438a48c0b70a840595a450ea6ea69..3aea8b52d2655cec92e034a5251fbf2bfee8fbf5 100644 (file)
@@ -47,3 +47,5 @@ val string_implode: char list -> string
 
 val reason_phrase_of_code: int -> string
 
+val build_sockaddr: addr:string -> port:int -> Unix.sockaddr
+