Simple_httpd.AddressSourceModule for declaring address and port to listen to
Module for declaring address and port to listen to
A type to index all listened addresses
type t = private {addr : string;The actual address in format "0.0.0.0"
*)port : int;The port
*)hosts : string list;The host we accept: any if the list is empty, only those listed otherwise
*)ssl : Ssl.context option;An optional ssl context
*)reuse : bool;Can we reuse the socket
*)mutable index : index ref;The index used to refer to the address, shared by all addresses with the same IP and port
*)}Record type storing an address we listen on
type ssl_info = {protocol : Ssl.protocol;minimum protocol to use, max is TSL1.3
*)cert : string;file name of the certificate
*)priv : string;file name of the private key
*)ktls : bool;use kernel TLS. Remark; Rx only available with openSSL >= 3.1. Check if suppoprted by each client before using
*)}type givent the relevant information for a ssl certificate
val make :
?addr:string ->
?port:int ->
?hosts:string list ->
?ssl:ssl_info ->
?reuse:bool ->
unit ->
tThe constructor to build an address
Functions to reuse the same address and ssl certificate with a different port or hosts.
set the period in seconds at which all ssl certificates are checked for renewal (default 1 day)