Skip to main content

Module server

Module server 

Source
Expand description

HTTP server module with server types and configuration.

Structs§

Server
Synchronous HTTP server for request/response conversion.
ServerConfig
Server configuration for the HTTP/1.1 server.
ShutdownController
Controller for coordinated graceful shutdown.
ShutdownReceiver
Receiver for shutdown notifications.
TcpServer
TCP server with asupersync integration.

Enums§

GracefulOutcome
Outcome of a task run with graceful shutdown support.
ServeError
Error returned when starting or running the server fails.
ServerError
HTTP server error.

Constants§

DEFAULT_DRAIN_TIMEOUT_SECS
Default drain timeout in seconds (time to wait for in-flight requests on shutdown).
DEFAULT_KEEP_ALIVE_TIMEOUT_SECS
Default keep-alive timeout in seconds (time to wait for next request).
DEFAULT_MAX_CONNECTIONS
Default maximum connections (0 = unlimited).
DEFAULT_MAX_REQUESTS_PER_CONNECTION
Default max requests per connection (0 = unlimited).
DEFAULT_READ_BUFFER_SIZE
Default read buffer size in bytes.
DEFAULT_REQUEST_TIMEOUT_SECS
Default request timeout in seconds.

Functions§

serve
Convenience function to serve an App on the given address.
serve_with_config
Convenience function to serve an App with custom configuration.