Table of Contents
- N_HTTP_SERVER_CONFIG
- Public Attributes
- Public Attributes Documentation
- variable write_timeout_ms
- variable workers
- variable user
- variable tls_key_file
- variable tls_cert_file
- variable require_host
- variable port
- variable max_requests_per_conn
- variable max_per_ip
- variable max_body
- variable idle_timeout_ms
- variable header_timeout_ms
- variable handshake_timeout_ms
- variable handler
- variable body_timeout_ms
- variable addr
N_HTTP_SERVER_CONFIG
Module: HTTP SERVER: TLS or plain HTTP/1.1, deadlines, limits, keep-alive
server settings; start from n_http_server_config_defaults()
#include "n_http_server.h"
Public Attributes
| Name | |
|---|---|
| int | write_timeout_ms deadline to write one response, ms (default 60000); for a streamed body, to write each piece of it (a long stream is not cut) |
| size_t | workers worker threads = most concurrent connections (default 32) |
| void * | user passed to the handler |
| const char * | tls_key_file PEM private key, NULL for plain HTTP. |
| const char * | tls_cert_file PEM certificate chain, NULL for plain HTTP. |
| int | require_host refuse HTTP/1.1 requests without exactly one Host (default 1) |
| const char * | port port to bind ("7430") |
| size_t | max_requests_per_conn requests served on one connection before it is closed (default 1000) |
| size_t | max_per_ip most connections from one peer address, 0 for no limit (default 0: behind a reverse proxy every connection has the proxy's address) |
| long long | max_body largest Content-Length accepted at all (default 32 MiB); handlers pass their own, lower cap to the body readers |
| int | idle_timeout_ms wait for the next request on a kept-alive connection, ms (default 15000) |
| int | header_timeout_ms request head deadline from its first byte, ms (default 10000) |
| int | handshake_timeout_ms TLS handshake deadline, ms (default 10000). |
| n_http_server_handler | handler the application |
| int | body_timeout_ms body deadline, ms (default 60000) |
| const char * | addr address to bind ("127.0.0.1") |
Public Attributes Documentation
variable write_timeout_ms
int write_timeout_ms;
deadline to write one response, ms (default 60000); for a streamed body, to write each piece of it (a long stream is not cut)
variable workers
size_t workers;
worker threads = most concurrent connections (default 32)
variable user
void * user;
passed to the handler
variable tls_key_file
const char * tls_key_file;
PEM private key, NULL for plain HTTP.
variable tls_cert_file
const char * tls_cert_file;
PEM certificate chain, NULL for plain HTTP.
variable require_host
int require_host;
refuse HTTP/1.1 requests without exactly one Host (default 1)
variable port
const char * port;
port to bind ("7430")
variable max_requests_per_conn
size_t max_requests_per_conn;
requests served on one connection before it is closed (default 1000)
variable max_per_ip
size_t max_per_ip;
most connections from one peer address, 0 for no limit (default 0: behind a reverse proxy every connection has the proxy's address)
variable max_body
long long max_body;
largest Content-Length accepted at all (default 32 MiB); handlers pass their own, lower cap to the body readers
variable idle_timeout_ms
int idle_timeout_ms;
wait for the next request on a kept-alive connection, ms (default 15000)
variable header_timeout_ms
int header_timeout_ms;
request head deadline from its first byte, ms (default 10000)
variable handshake_timeout_ms
int handshake_timeout_ms;
TLS handshake deadline, ms (default 10000).
variable handler
n_http_server_handler handler;
the application
variable body_timeout_ms
int body_timeout_ms;
body deadline, ms (default 60000)
variable addr
const char * addr;
address to bind ("127.0.0.1")
Modules
- AABB3D
- ACCEPT_POOL
- ALLEGRO4
- ALLEGRO5
- ANIM_LIB
- ASTAR
- ATLAS_LIB
- AVRO
- CLOCK_SYNC
- COMMONS
- CONFIGFILE
- CYPHER_BASE64
- CYPHER_VIGENERE
- DEAD_RECKONING
- ENUMS
- EXCEPTIONS
- GAME_ENV
- GIT
- GUI
- HASH_TABLE
- ISOMETRIC_ENGINE
- LIST
- LOG
- LOGNODUP
- LZ4
- NETWORKING
- NETWORK_MSG
- N_COOKIES
- N_DIFF
- N_DIGEST
- N_DISK_CACHE
- N_DNS
- N_ECC
- N_ENTROPY
- N_FILES
- N_FLUIDS
- N_GUI_COLOR
- N_GUI_COLORWHEEL
- N_GUI_CURVE
- N_GUI_GRID
- N_GUI_POPUP
- N_HEX
- N_HTTP3
- N_HTTP_COOKIE
- N_HTTP_FORM
- N_HTTP_MIME
- N_HTTP_REQ
- N_HTTP_RESP
- N_HTTP_ROUTER
- N_HTTP_SERVER
- N_ICC
- N_JSON
- N_KAFKA
- N_LINALG
- N_MODULE
- N_OPENSSL_COMPAT
- N_PRETTY
- N_PTH
- N_QUERY
- N_RANDOM
- N_SHA256
- N_STR
- N_TIFF
- N_TIME
- N_USER
- N_X509
- N_ZIP
- PARTICLES
- PCRE
- PHYSICS
- SIGNALS
- STACK
- THREADS
- TRAJECTORY
- TREE
- ZLIB