Plasma GitLab Archive
Projects Blog Knowledge

Class type virtual Nethttpd_types.v_extended_environment

class type virtual v_extended_environment = object .. end

An extension of cgi_environment for use with the daemon. The methods retrieving the socket addresses are virtual.

Inherits
method virtual server_socket_addr : Unix.sockaddr
method virtual remote_socket_addr : Unix.sockaddr

These are always the physical IP addresses and ports of the two endpoints of the current connection.

method cgi_request_uri : string

The full request URI. Identical to the CGI property "REQUEST_URI"

method log_props : (string * string) list -> unit

Remember this version of cgi_properties as the one sent to the config_log_access function

method input_channel : Netchannels.in_obj_channel

The input channel for reading the body of the request

method input_body_size : int64

so far known, or 0L

method request_body_rejected : bool

so far known, or false

method send_file : Unix.file_descr -> int64 -> unit

Sends the output header with a file as body. The file must already be open, and positioned where the transmission begins. The number is the length of the transmission.

This method may return immediately when it is possible to open the file, and to set the kernel up for file transmission. Otherwise a Unix_error is raised. It is also allowed that this method blocks until the file is actually transmitted.

It is not allowed to print to the output channel and to call send_file. Only one transmission method must be invoked.

method virtual output_state : output_state Stdlib.ref

Reflects the state of the output generation:

  • `Start: Nothing is generated yet
  • `Sending: Output is already being sent
  • `End: The response (for a single request) has been fully sent
method tls_session_props : Nettls_support.tls_session_props option

The TLS session properties if TLS is active

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml