KEEL 1.0.0
Minimal C11 HTTP client/server library built on epoll/kqueue/io_uring/poll
Loading...
Searching...
No Matches
Data Fields
KlConfig Struct Reference

#include <server.h>

Collaboration diagram for KlConfig:
Collaboration graph
[legend]

Data Fields

int port
 
const char * bind_addr
 
int max_connections
 
int read_timeout_ms
 
int body_timeout_ms
 
KlAllocatoralloc
 
KlParserFactory parser
 
KlAccessLogFn access_log
 
void * access_log_data
 
KlLogFn log_fn
 
void * log_user_data
 
int install_signal_handlers
 
int drain_timeout_ms
 
KlTlsConfigtls
 
KlH2ServerConfigh2
 
size_t max_body_size
 
size_t max_header_size
 
KlCompressConfigcompress
 

Field Documentation

◆ port

int KlConfig::port

◆ bind_addr

const char* KlConfig::bind_addr

default: "0.0.0.0"

◆ max_connections

int KlConfig::max_connections

default: KL_DEFAULT_MAX_CONNS

◆ read_timeout_ms

int KlConfig::read_timeout_ms

default: KL_DEFAULT_READ_TIMEOUT

◆ body_timeout_ms

int KlConfig::body_timeout_ms

total body deadline; 0 = use read_timeout_ms

◆ alloc

KlAllocator* KlConfig::alloc

default: stdlib

◆ parser

KlParserFactory KlConfig::parser

default: kl_parser_llhttp

◆ access_log

KlAccessLogFn KlConfig::access_log

default: NULL (disabled)

◆ access_log_data

void* KlConfig::access_log_data

passed as user_data to access_log

◆ log_fn

KlLogFn KlConfig::log_fn

default: NULL (fprintf stderr)

◆ log_user_data

void* KlConfig::log_user_data

◆ install_signal_handlers

int KlConfig::install_signal_handlers

install SIGTERM/SIGINT handlers (single instance only — only the last server to call kl_server_run() receives signals)

◆ drain_timeout_ms

int KlConfig::drain_timeout_ms

graceful shutdown drain timeout (0 = immediate)

◆ tls

KlTlsConfig* KlConfig::tls

TLS config — NULL = plaintext (default)

◆ h2

KlH2ServerConfig* KlConfig::h2

HTTP/2 config — NULL = disabled (default)

◆ max_body_size

size_t KlConfig::max_body_size

discard-path body limit; default: 1 MB

◆ max_header_size

size_t KlConfig::max_header_size

max header block size; 0 = KL_READ_BUF_SIZE (8192)

◆ compress

KlCompressConfig* KlConfig::compress

compression config — NULL = disabled (default)


The documentation for this struct was generated from the following file: