14#ifdef ORBIT_ENABLE_HTTP3
Definition ThreadPool.hpp:13
Server TLS settings: certificates (with SNI) and ALPN.
Definition TlsContext.hpp:22
Definition UdpSocket.hpp:8
Manages routing of HTTP requests to their appropriate handlers.
Definition Router.hpp:46
Manages active HTTP connections.
Definition ConnectionManager.hpp:20
size_t get_connection_count() const
Gets the current number of active connections.
Manages the server's event loop, handling I/O operations and dispatching tasks.
Definition EventLoop.hpp:26
Listener & listener_
Definition EventLoop.hpp:108
std::chrono::steady_clock::time_point last_websocket_ping_
Definition EventLoop.hpp:127
std::chrono::steady_clock::time_point last_limit_warning_
Definition EventLoop.hpp:138
void stop()
Stops the event loop.
void run()
Starts the event loop.
size_t max_connections_
Definition EventLoop.hpp:130
bool at_connection_limit() const
void share_connection_limit(std::atomic< size_t > *open)
QuicConnectionManager * quic_manager_
Definition EventLoop.hpp:114
concurrency::ThreadPool & get_thread_pool()
Gets the thread pool.
Definition EventLoop.hpp:83
concurrency::ThreadPool & thread_pool_
Definition EventLoop.hpp:111
bool accept_paused_
Definition EventLoop.hpp:136
std::atomic< bool > is_accepting_
Definition EventLoop.hpp:119
std::function< void()> tick_hook_
Definition EventLoop.hpp:118
void on_accepted(network::socket_t client_fd, const sockaddr_in &addr)
std::unique_ptr< network::Proactor > proactor_
Definition EventLoop.hpp:110
void set_tick_hook(std::function< void()> hook)
Registers a function the loop calls on every iteration, on the loop thread. The loop wakes at least e...
Definition EventLoop.hpp:77
size_t connection_count() const
Connections this loop currently holds.
Definition EventLoop.hpp:92
void stop_accepting()
Stops accepting new connections but continues processing existing ones.
std::atomic< std::chrono::steady_clock::rep > shutdown_deadline_
Definition EventLoop.hpp:123
std::chrono::seconds websocket_ping_interval_
Definition EventLoop.hpp:126
void request_shutdown(std::chrono::steady_clock::time_point deadline)
Graceful shutdown; safe to call from any thread. Stops accepting, closes idle connections,...
bool nonblocking_accepts_
Definition EventLoop.hpp:133
EventLoop(Listener &listener, const routing::Router &router, const config::ServerConfig &config, concurrency::ThreadPool &thread_pool, network::TlsContext *tls_context=nullptr, network::UdpSocket *quic_socket=nullptr, QuicConnectionManager *quic_manager=nullptr)
Constructs an EventLoop.
std::atomic< bool > shutdown_requested_
Definition EventLoop.hpp:122
std::atomic< bool > is_running_
Definition EventLoop.hpp:117
std::atomic< size_t > * shared_open_
Definition EventLoop.hpp:132
TimerManager timer_manager_
Definition EventLoop.hpp:109
ConnectionManager connection_manager_
Definition EventLoop.hpp:112
void resume_accepting_if_ready()
bool draining_
Definition EventLoop.hpp:124
network::UdpSocket * quic_socket_
Definition EventLoop.hpp:113
std::chrono::steady_clock::time_point accept_resume_at_
Definition EventLoop.hpp:137
void pause_accepting(std::chrono::steady_clock::time_point until)
Listens for incoming network connections.
Definition Listener.hpp:13
Manages QUIC connections.
Definition QuicConnectionManager.hpp:57
Manages timers for connection timeouts.
Definition TimerManager.hpp:29
int socket_t
Definition PlatformSocket.hpp:39
Definition Http2Session.hpp:18