module Server: sig endval system_inactive : unit -> boolval system_sleep : int -> unitval system_set_user : string -> unitval system_stop : unit -> unitval system_stopped : unit -> boolval system_add_safe : string -> string -> unitset directory
Add a directory to the list of directories (including their sub directories) where static content of the website is searched.
The first added directory acts like the root directory of the static content of the server.
val system_check_safe : string -> string -> boolset file
Symbolic links are checked and when the resulting file is inside one of the save directories this function returns trueval set_server_parm : string -> string -> unitvar value
Set an internal server variable, these are readable by all the client scripts
special values:
"status" of HTTP-response
val socket_create : int -> int -> intport_nr max_connections resulting in the socketval socket_loop : unit -> boolval socket_create_ssl : int -> int -> string -> string -> string -> intport_nr max_connections certificate_file
privatekey_file certificate_password resulting in the socketval socket_listen : unit -> unitval socket_close : int -> unitval socket_current : unit -> intval conn_loop : unit -> boolval conn_header : int -> int -> intkeep_alive time to wait for new headers on the current connections and a
timeout that stops reading after this amount of inactivity both the parameters are in milliseconds.
The functions returns 1 after completion of the header or 2 to close the current connection (error or keep_alive exceeded).
On a 0 the rest of the connections should be checked and then this connection should be checked again for completion.
val conn_send : int -> unittimeout and it stops sending after the time in milliseconds of inactivity.val conn_var : string -> string -> stringtype name can be:val conn_var_list : string -> string -> stringval conn_var_loop : string -> stringval conn_cookie : string -> string -> int -> unitconn_set_cookie name value daysval conn_calc : (string -> string -> Html.t list) -> string -> string -> booldocalc is a function that should provide
the calculation itself and results into html data. The other parameters tp and name are given to docalc as a tuple to find the correct
dynamic page to calculate. The first parameter to docalc contains all the information that can be gathered by the 'conn_var' function.val conn_close : unit -> unitval conn_file : string -> string -> int -> boolset filename expires -> will_be_send?
Send a total file over the connection. This function tries to determine the mime-type of this file.
The expires is counted in days from now, this can be zero to check the cache date every time.val conn_parms : unit -> string