From: Stefano Zacchiroli Date: Fri, 6 Dec 2002 16:40:26 +0000 (+0000) Subject: added 'build_sockaddr' X-Git-Tag: v0_3_99~173 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=34a1ea600a101bec4e1cdc40bfbdec93d503fa51;p=helm.git added 'build_sockaddr' --- diff --git a/helm/DEVEL/ocaml-http/http_misc.ml b/helm/DEVEL/ocaml-http/http_misc.ml index edacea23a..8117c540b 100644 --- a/helm/DEVEL/ocaml-http/http_misc.ml +++ b/helm/DEVEL/ocaml-http/http_misc.ml @@ -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) + diff --git a/helm/DEVEL/ocaml-http/http_misc.mli b/helm/DEVEL/ocaml-http/http_misc.mli index f12e9ad0d..3aea8b52d 100644 --- a/helm/DEVEL/ocaml-http/http_misc.mli +++ b/helm/DEVEL/ocaml-http/http_misc.mli @@ -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 +