A strongly-typed data container for a server block's configuration.
Definition ServerConfig.hpp:22
bool getisRunning() const
Definition Server.cpp:109
Server & operator=(const Server &)
config::ServerConfig const & config_
Const reference to the parsed server configuration.
Definition Server.hpp:57
http::Router router_
HTTP request router for dispatching requests to handlers.
Definition Server.hpp:60
static int getNullFd()
Gets the server-wide file descriptor for /dev/null.
Definition Server.cpp:140
std::vector< network::Acceptor * > acceptors_
Collection of active acceptor handlers (listening sockets).
Definition Server.hpp:55
network::EventDispatcher & dispatcher_
Reference to the central EventDispatcher (Reactor) singleton.
Definition Server.hpp:58
~Server()
Definition Server.cpp:69
void setupAcceptors()
Definition Server.cpp:111
void gracefulShutdown()
Definition Server.cpp:99
void requestShutDown()
Definition Server.cpp:142
http::MimeTypes mimeTypes_
MIME types database instance (passed to the router).
Definition Server.hpp:59
void stop()
Definition Server.cpp:93
volatile sig_atomic_t shutdownRequested_
Graceful shutdown flag (must be volatile sig_atomic_t for signal handler).
Definition Server.hpp:54
bool isRunning_
Tracks main loop state (true between start() and gracefulShutdown()).
Definition Server.hpp:53
Server(config::ServerConfig const &)
Definition Server.cpp:52
int nullFd_
Server-wide file descriptor for /dev/null (opened at startup).
Definition Server.hpp:62
void cleanup()
Definition Server.cpp:132
void start()
Definition Server.cpp:78
Definition MimeTypes.hpp:11
The central request dispatcher (Facade).
Definition Router.hpp:20
Centralised event demultiplexer and dispatcher for managing I/O events.
Definition EventDispatcher.hpp:19