]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/ocaml-http/http_types.ml
rebuilt
[helm.git] / helm / DEVEL / ocaml-http / http_types.ml
index 7233056fc40152c6cc6c34d90aa5eb57c9bdd372..fa09a3d5c72023d428f19b09b07bf6c410fa5a0a 100644 (file)
@@ -108,6 +108,8 @@ type status =
   ]
 
 exception Invalid_header of string
+exception Invalid_header_name of string
+exception Invalid_header_value of string
 exception Invalid_HTTP_version of string
 exception Invalid_code of int
 exception Invalid_status of status
@@ -149,8 +151,10 @@ class type response =
     method addContents: string -> unit
     method addContentsBuf: Buffer.t -> unit
     method addHeader: name:string -> value:string -> unit
+    method addHeaders: (string * string) list -> unit
     method addBasicHeaders: unit
     method replaceHeader: name:string -> value:string -> unit
+    method replaceHeaders: (string * string) list -> unit
     method removeHeader: name:string -> unit
     method hasHeader: name:string -> bool
     method header: name:string -> string
@@ -175,4 +179,19 @@ class type request =
     method param: string -> string
     method paramAll: string -> string list
     method params: (string * string) list
+    method clientSockaddr: Unix.sockaddr
+    method clientAddr: string
+    method clientPort: int
   end
+class type connection =
+  object
+    method getRequest: request option
+    method respond_with: response -> unit
+    method close: unit
+  end
+class type daemon =
+  object
+    method accept: connection
+    method getRequest: request * connection
+  end
+