|
Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
|
Manages QUIC connections. More...
#include <QuicConnectionManager.hpp>

Public Member Functions | |
| QuicConnectionManager (network::UdpSocket &socket, SSL_CTX *ssl_ctx) | |
| Constructs a QuicConnectionManager. | |
| ~QuicConnectionManager () | |
| void | on_packet_received (const uint8_t *data, size_t datalen, const sockaddr_in &remote_addr) |
| Processes an incoming UDP packet for QUIC. | |
| void | send_packet (const uint8_t *data, size_t datalen, const sockaddr *remote_addr, socklen_t remote_addrlen) |
| Sends a QUIC packet to a remote address. | |
| void | handle_timers () |
| Event-loop thread: runs due timers and forgets finished connections. | |
| int | next_timeout_ms () const |
| Milliseconds until a connection's next timer, or -1 if none. | |
| size_t | connection_count () const |
| void | set_http_context (const Http3Context &ctx) |
| const Http3Context & | http_context () const |
Private Member Functions | |
| void | sync_connection (const std::shared_ptr< QuicConnection > &conn) |
| size_t | unique_connections () const |
Private Attributes | |
| network::UdpSocket & | socket_ |
| SSL_CTX * | ssl_ctx_ {nullptr} |
| Http3Context | http_context_ |
| std::unordered_map< ngtcp2_cid, std::shared_ptr< QuicConnection >, QuicConnectionIdHash, QuicConnectionIdEqual > | connections_ |
Manages QUIC connections.
| orbit::server::QuicConnectionManager::QuicConnectionManager | ( | network::UdpSocket & | socket, |
| SSL_CTX * | ssl_ctx | ||
| ) |
Constructs a QuicConnectionManager.
| socket | The UDP socket for QUIC. |
| ssl_ctx | The SSL context for QUIC. |
| orbit::server::QuicConnectionManager::~QuicConnectionManager | ( | ) |
|
inline |
| void orbit::server::QuicConnectionManager::handle_timers | ( | ) |
Event-loop thread: runs due timers and forgets finished connections.
|
inline |
| int orbit::server::QuicConnectionManager::next_timeout_ms | ( | ) | const |
Milliseconds until a connection's next timer, or -1 if none.
| void orbit::server::QuicConnectionManager::on_packet_received | ( | const uint8_t * | data, |
| size_t | datalen, | ||
| const sockaddr_in & | remote_addr | ||
| ) |
Processes an incoming UDP packet for QUIC.
| data | The packet data. |
| datalen | The length of the data. |
| remote_addr | The remote address of the sender. |
| void orbit::server::QuicConnectionManager::send_packet | ( | const uint8_t * | data, |
| size_t | datalen, | ||
| const sockaddr * | remote_addr, | ||
| socklen_t | remote_addrlen | ||
| ) |
Sends a QUIC packet to a remote address.
| data | The packet data. |
| datalen | The length of the data. |
| remote_addr | The remote address. |
| remote_addrlen | The length of the remote address struct. |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |