Skip to main content

Module server

Module server 

Source
Expand description

Core HTTP server runtime.

Use this module when you need a static-first HTTP server with predictable request parsing, policy-aware response generation, and portable runtime behavior across macOS, Linux, and WSL.

The primary entrypoints are Server and ServerBuilder.

Structs§

ConnectionGuard
RAII guard for connection pool resources
ConnectionPool
Holds the connection pool state for managing database or external connections
Server
Serves static HTTP content with configurable runtime policies.
ServerBuilder
Builds a Server with optional policy and timeout configuration.
ShutdownSignal
Holds shutdown state and coordination for graceful server termination
ThreadPool
A simple thread pool for handling concurrent connections efficiently

Constants§

DEFAULT_MAX_BUFFERED_BODY_BYTES
Default ceiling for the in-memory serve_file_response path when Server::max_buffered_body_bytes isn’t set explicitly. Files larger than this cap are rejected with 503 Service Unavailable rather than allowed to drive the server’s RSS to N × file_size on N concurrent requests.