X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Focaml-http%2Fhttp_daemon.mli;h=784cc8eb982ad3a4d6db3915b8df535af4dd93c9;hb=caab26f85122e0040555139c48a9111a0b2b9fff;hp=7a3ce42d0e196fdef9a0105c31475afb7c511c58;hpb=ca9cd0aeee0ce78a891f7f6091ca8704231a446d;p=helm.git diff --git a/helm/DEVEL/ocaml-http/http_daemon.mli b/helm/DEVEL/ocaml-http/http_daemon.mli index 7a3ce42d0..784cc8eb9 100644 --- a/helm/DEVEL/ocaml-http/http_daemon.mli +++ b/helm/DEVEL/ocaml-http/http_daemon.mli @@ -19,6 +19,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *) +(** Main OCaml HTTP module. + Here you can find two set of functions: + - functions which let you start an HTTP Daemon (start* functions) + - facility functions which let you sent responses back to clients *) + (** send a CRLF sequence on the given output channel, this is mandatory after the last header was sent and before start sending the response body *) val send_CRLF: out_channel -> unit @@ -125,12 +130,25 @@ val start': (Http_types.request -> out_channel -> unit) -> unit - (** Trivial static pages HTTP daemon *) + (** Object oriented interface to HTTP daemons. + @param addr address on which daemon will listen for connections + @param port port which daemon will bind + see {! Http_types.daemon} *) +class daemon: + ?addr: string -> ?port: int -> + unit -> + Http_types.daemon + + (** Trivial static pages HTTP daemon. + Daemons created using this module will serve directory indexes and files found + starting from the working directory *) module Trivial : sig + (** callback function, exposed if you like to use it as a basis to define + a more powerful daemon *) val callback : string -> 'a -> out_channel -> unit + + (** start the "trivial" HTTP daemon *) val start : ?addr:string -> ?port:int -> unit -> unit end -class daemon: ?addr: string -> ?port: int -> unit -> Http_types.daemon -