X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Focaml-http%2Fhttp_misc.mli;h=b6e28e2bcbdc3a3782dfe5d73481dc3ff1d9906a;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=86293404035dc2e04b22042d32bf90048c269b05;hpb=ca9cd0aeee0ce78a891f7f6091ca8704231a446d;p=helm.git diff --git a/helm/DEVEL/ocaml-http/http_misc.mli b/helm/DEVEL/ocaml-http/http_misc.mli index 862934040..b6e28e2bc 100644 --- a/helm/DEVEL/ocaml-http/http_misc.mli +++ b/helm/DEVEL/ocaml-http/http_misc.mli @@ -2,25 +2,25 @@ (* OCaml HTTP - do it yourself (fully OCaml) HTTP daemon - Copyright (C) <2002> Stefano Zacchiroli + Copyright (C) <2002-2005> Stefano Zacchiroli This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + it under the terms of the GNU Library General Public License as + published by the Free Software Foundation, version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Library General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA *) (** 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 *) @@ -44,6 +44,7 @@ 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 @@ -53,6 +54,7 @@ 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 @@ -60,14 +62,18 @@ 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 *) @@ -77,3 +83,6 @@ val buf_of_inchan: ?limit: int -> in_channel -> Buffer.t leftmost one only *) val list_assoc_all: 'a -> ('a * 'b) list -> 'b list +val warn: string -> unit (** print a warning msg to stderr. Adds trailing \n *) +val error: string -> unit (** print an error msg to stderr. Adds trailing \n *) +