From 34a1ea600a101bec4e1cdc40bfbdec93d503fa51 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Fri, 6 Dec 2002 16:40:26 +0000 Subject: [PATCH] added 'build_sockaddr' --- helm/DEVEL/ocaml-http/http_misc.ml | 3 +++ helm/DEVEL/ocaml-http/http_misc.mli | 2 ++ 2 files changed, 5 insertions(+) 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 + -- 2.39.2