X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Focaml-http%2Fhttp_misc.mli;h=d19535e948b3913096caf552eba2ae36b6f4501d;hb=5325734bc2e4927ed7ec146e35a6f0f2b49f50c1;hp=f12e9ad0de0438a48c0b70a840595a450ea6ea69;hpb=b6acab3d2cc20fd002a6e92688507713c97f51bd;p=helm.git diff --git a/helm/DEVEL/ocaml-http/http_misc.mli b/helm/DEVEL/ocaml-http/http_misc.mli index f12e9ad0d..d19535e94 100644 --- a/helm/DEVEL/ocaml-http/http_misc.mli +++ b/helm/DEVEL/ocaml-http/http_misc.mli @@ -20,7 +20,7 @@ *) (** Helpers and other not better classified functions which should not be -visible to the final user *) +exposed in the final API *) (** @return the current date compliant to RFC 1123, which updates RFC 822 zone info are retrieved from UTC *) @@ -42,8 +42,44 @@ val strip_heading_slash: string -> string (** given a dir handle @return a list of entries contained *) val ls: Unix.dir_handle -> string list + (** explode a string in a char list *) val string_explode: string -> char list + + (** implode a char list in a string *) val string_implode: char list -> string + (** given an HTTP response code return the corresponding reason phrase *) val reason_phrase_of_code: int -> string + (** build a Unix.sockaddr inet address from a string representation of an IP + address and a port number *) +val build_sockaddr: string * int -> Unix.sockaddr + + (** explode an _inet_ Unix.sockaddr address in a string representation of an + IP address and a port number *) +val explode_sockaddr: Unix.sockaddr -> string * int + + (** given an out_channel build on top of a socket, return peername related to + that socket *) +val peername_of_out_channel: out_channel -> Unix.sockaddr + + (** as above but works on in_channels *) +val peername_of_in_channel: in_channel -> Unix.sockaddr + + (** given an out_channel build on top of a socket, return sockname related to + that socket *) +val sockname_of_out_channel: out_channel -> Unix.sockaddr + + (** as above but works on in_channels *) +val sockname_of_in_channel: in_channel -> Unix.sockaddr + + (* TODO replace with Buffer.add_channel which does almost the same :-((( *) + (** reads from an input channel till it End_of_file and returns what has been + read; if limit is given returned buffer will contains at most first 'limit' + bytes read from input channel *) +val buf_of_inchan: ?limit: int -> in_channel -> Buffer.t + + (** like List.assoc but return all bindings of a given key instead of the + leftmost one only *) +val list_assoc_all: 'a -> ('a * 'b) list -> 'b list +