Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
include module type of struct include Server_core end
module IO = Server_core.IO
type conn = IO.conn * Cohttp.Connection.t
type response_action = [
| `Expert of Cohttp.Response.t * (IO.ic -> IO.oc -> unit Lwt.t)
| `Response of Cohttp.Response.t * Cohttp_lwt.Body.t
]
val make_response_action :
?conn_closed:(conn -> unit) ->
callback:
(conn -> Cohttp.Request.t -> Cohttp_lwt.Body.t -> response_action Lwt.t) ->
unit ->
t
val make_expert :
?conn_closed:(conn -> unit) ->
callback:
(conn ->
Cohttp.Request.t ->
Cohttp_lwt.Body.t ->
(Cohttp.Response.t * (IO.ic -> IO.oc -> unit Lwt.t)) Lwt.t) ->
unit ->
t
val make :
?conn_closed:(conn -> unit) ->
callback:
(conn ->
Cohttp.Request.t ->
Cohttp_lwt.Body.t ->
(Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t) ->
unit ->
t
val resolve_local_file : docroot:string -> uri:Uri.t -> string
val respond :
?headers:Cohttp.Header.t ->
?flush:bool ->
status:Cohttp.Code.status_code ->
body:Cohttp_lwt.Body.t ->
unit ->
(Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t
val respond_string :
?flush:bool ->
?headers:Cohttp.Header.t ->
status:Cohttp.Code.status_code ->
body:string ->
unit ->
(Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t
val respond_error :
?headers:Cohttp.Header.t ->
?status:Cohttp.Code.status_code ->
body:string ->
unit ->
(Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t
val respond_redirect :
?headers:Cohttp.Header.t ->
uri:Uri.t ->
unit ->
(Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t
val respond_need_auth :
?headers:Cohttp.Header.t ->
auth:Cohttp.Auth.challenge ->
unit ->
(Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t
val respond_not_found :
?uri:Uri.t ->
unit ->
(Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t
val init' :
?backlog:int ->
?stop:unit Lwt.t ->
?timeout:int ->
Tls.Config.server ->
Unix.sockaddr ->
(Tls_lwt.Unix.t ->
Lwt_io.input Lwt_io.channel ->
Lwt_io.output Lwt_io.channel ->
unit Lwt.t) ->
unit Lwt.t
val init :
?backlog:int ->
certfile:Lwt_io.file_name ->
keyfile:Lwt_io.file_name ->
?stop:unit Lwt.t ->
?timeout:int ->
Unix.sockaddr ->
(Tls_lwt.Unix.t ->
Lwt_io.input Lwt_io.channel ->
Lwt_io.output Lwt_io.channel ->
unit Lwt.t) ->
unit Lwt.t
val create :
?timeout:int ->
?stop:unit Lwt.t ->
?on_exn:'a ->
?sockaddr:Unix.sockaddr ->
?port:int ->
Tls.Config.server ->
t ->
unit Lwt.t