package piaf

  1. Overview
  2. Docs
module HTTPS : sig ... end
type t = {
  1. max_http_version : Versions.HTTP.t;
    (*

    Use this as:

    • the highest HTTP version that ALPN will negotiate with the remote peer
    • the version to listen on the insecure server:
    • max_http_version == HTTP/2 && h2c_upgrade => HTTP/1.1 + H2c upgrade
    • max_http_version == HTTP/2 => HTTP/2 server
    *)
  2. https : HTTPS.t option;
  3. h2c_upgrade : bool;
    (*

    Send an upgrade to `h2c` (HTTP/2 over TCP) request to the server. `http2_prior_knowledge` below ignores this option.

    *)
  4. tcp_nodelay : bool;
  5. accept_timeout : float;
  6. shutdown_timeout : float;
    (*

    seconds. How long to wait until connections terminate before shutting down the server.

    *)
  7. buffer_size : int;
    (*

    Buffer size used for requests and responses. Defaults to 16384 bytes

    *)
  8. body_buffer_size : int;
    (*

    Buffer size used for request and response bodies.

    *)
  9. enable_http2_server_push : bool;
    (*

    TODO(anmonteiro): these are HTTP/2 specific and we're probably OK with the defaults

    *)
  10. flush_headers_immediately : bool;
    (*

    Specifies whether to flush message headers to the transport immediately, or if Piaf should wait for the first body bytes to be written. Defaults to false.

    *)
  11. backlog : int;
    (*

    The maximum length of the queue of pending connections.

    *)
  12. address : Eio.Net.Sockaddr.stream;
    (*

    The address to listen on.

    *)
  13. domains : int;
    (*

    The number of domains to use.

    *)
  14. reuse_addr : bool;
  15. reuse_port : bool;
}
val create : ?max_http_version:Versions.HTTP.t -> ?https:HTTPS.t -> ?h2c_upgrade:bool -> ?tcp_nodelay:bool -> ?accept_timeout:float -> ?shutdown_timeout:float -> ?buffer_size:int -> ?body_buffer_size:int -> ?flush_headers_immediately:bool -> ?backlog:int -> ?reuse_addr:bool -> ?reuse_port:bool -> ?domains:int -> Eio.Net.Sockaddr.stream -> t
OCaml

Innovation. Community. Security.