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§
- Connection
Guard - RAII guard for connection pool resources
- Connection
Pool - Holds the connection pool state for managing database or external connections
- Server
- Serves static HTTP content with configurable runtime policies.
- Server
Builder - Builds a
Serverwith optional policy and timeout configuration. - Shutdown
Signal - Holds shutdown state and coordination for graceful server termination
- Thread
Pool - A simple thread pool for handling concurrent connections efficiently
Constants§
- DEFAULT_
MAX_ BUFFERED_ BODY_ BYTES - Default ceiling for the in-memory
serve_file_responsepath whenServer::max_buffered_body_bytesisn’t set explicitly. Files larger than this cap are rejected with503 Service Unavailablerather than allowed to drive the server’s RSS to N × file_size on N concurrent requests.