idfxx 1.0.0
Modern C++23 components for ESP-IDF
Loading...
Searching...
No Matches
idfxx::http::ssl_server::config Struct Reference

HTTPS server configuration. More...

#include <idfxx_https_server/include/idfxx/http/ssl_server.hpp>

Public Attributes

task_priority priority = 5
 Priority of the server task.
 
size_t stack_size = 10240
 Stack size for the server task (10KB)
 
std::optional< core_idcore_affinity = std::nullopt
 Core pin (nullopt = any core)
 
uint16_t server_port = 443
 HTTPS listening port.
 
uint16_t ctrl_port = 32769
 Control port for server commands.
 
uint16_t backlog_conn = 5
 Maximum backlog connections.
 
uint16_t max_open_sockets = 4
 Maximum concurrent client connections.
 
uint16_t max_uri_handlers = 8
 Maximum registered URI handlers.
 
uint16_t max_resp_headers = 8
 Maximum additional response headers.
 
size_t max_req_hdr_len = 0
 Maximum request header length (0 = Kconfig default)
 
size_t max_uri_len = 0
 Maximum URI length (0 = Kconfig default)
 
std::chrono::seconds recv_wait_timeout {5}
 Receive timeout.
 
std::chrono::seconds send_wait_timeout {5}
 Send timeout.
 
bool lru_purge_enable = true
 Purge least-recently-used connections when full.
 
bool enable_so_linger = false
 Enable SO_LINGER on sockets.
 
std::chrono::seconds linger_timeout {0}
 Linger timeout.
 
bool keep_alive_enable = false
 Enable TCP keep-alive.
 
std::chrono::seconds keep_alive_idle {0}
 Keep-alive idle time.
 
std::chrono::seconds keep_alive_interval {0}
 Keep-alive probe interval.
 
int keep_alive_count = 0
 Keep-alive probe count.
 
bool wildcard_uri_match = false
 Enable wildcard URI matching.
 
std::move_only_function< result< void >(int) conston_session_open = {}
 Called when a new session is opened.
 
std::move_only_function< void(int) conston_session_close = {}
 Called when a session is closed.
 
std::string server_cert = {}
 Server certificate (PEM format)
 
std::string private_key = {}
 Server private key (PEM format)
 
std::string client_ca_cert = {}
 CA cert for client verification (optional, PEM format)
 
bool use_ecdsa_peripheral = false
 Use ECDSA peripheral for key operations.
 
uint8_t ecdsa_key_efuse_blk = 0
 eFuse block number for ECDSA key
 
bool session_tickets = false
 Enable TLS session tickets.
 
bool use_secure_element = false
 Use secure element for key storage.
 
std::chrono::milliseconds handshake_timeout {0}
 TLS handshake timeout (0 = default 10s)
 

Detailed Description

HTTPS server configuration.

Contains all HTTP server settings (with HTTPS-appropriate defaults) plus TLS certificate and key fields.

Note
The HTTP server fields are intentionally duplicated from server::config rather than inherited, to preserve C++20 designated initializer support. If adding or modifying common fields, mirror the changes in server::config.

Definition at line 65 of file ssl_server.hpp.

Member Data Documentation

◆ backlog_conn

uint16_t idfxx::http::ssl_server::config::backlog_conn = 5

Maximum backlog connections.

Definition at line 74 of file ssl_server.hpp.

◆ client_ca_cert

std::string idfxx::http::ssl_server::config::client_ca_cert = {}

CA cert for client verification (optional, PEM format)

Definition at line 112 of file ssl_server.hpp.

◆ core_affinity

std::optional<core_id> idfxx::http::ssl_server::config::core_affinity = std::nullopt

Core pin (nullopt = any core)

Definition at line 69 of file ssl_server.hpp.

◆ ctrl_port

uint16_t idfxx::http::ssl_server::config::ctrl_port = 32769

Control port for server commands.

Definition at line 73 of file ssl_server.hpp.

◆ ecdsa_key_efuse_blk

uint8_t idfxx::http::ssl_server::config::ecdsa_key_efuse_blk = 0

eFuse block number for ECDSA key

Definition at line 114 of file ssl_server.hpp.

◆ enable_so_linger

bool idfxx::http::ssl_server::config::enable_so_linger = false

Enable SO_LINGER on sockets.

Definition at line 91 of file ssl_server.hpp.

◆ handshake_timeout

std::chrono::milliseconds idfxx::http::ssl_server::config::handshake_timeout {0}

TLS handshake timeout (0 = default 10s)

Definition at line 117 of file ssl_server.hpp.

◆ keep_alive_count

int idfxx::http::ssl_server::config::keep_alive_count = 0

Keep-alive probe count.

Definition at line 98 of file ssl_server.hpp.

◆ keep_alive_enable

bool idfxx::http::ssl_server::config::keep_alive_enable = false

Enable TCP keep-alive.

Definition at line 95 of file ssl_server.hpp.

◆ keep_alive_idle

std::chrono::seconds idfxx::http::ssl_server::config::keep_alive_idle {0}

Keep-alive idle time.

Definition at line 96 of file ssl_server.hpp.

◆ keep_alive_interval

std::chrono::seconds idfxx::http::ssl_server::config::keep_alive_interval {0}

Keep-alive probe interval.

Definition at line 97 of file ssl_server.hpp.

◆ linger_timeout

std::chrono::seconds idfxx::http::ssl_server::config::linger_timeout {0}

Linger timeout.

Definition at line 92 of file ssl_server.hpp.

◆ lru_purge_enable

bool idfxx::http::ssl_server::config::lru_purge_enable = true

Purge least-recently-used connections when full.

Definition at line 88 of file ssl_server.hpp.

◆ max_open_sockets

uint16_t idfxx::http::ssl_server::config::max_open_sockets = 4

Maximum concurrent client connections.

Definition at line 77 of file ssl_server.hpp.

◆ max_req_hdr_len

size_t idfxx::http::ssl_server::config::max_req_hdr_len = 0

Maximum request header length (0 = Kconfig default)

Definition at line 80 of file ssl_server.hpp.

◆ max_resp_headers

uint16_t idfxx::http::ssl_server::config::max_resp_headers = 8

Maximum additional response headers.

Definition at line 79 of file ssl_server.hpp.

◆ max_uri_handlers

uint16_t idfxx::http::ssl_server::config::max_uri_handlers = 8

Maximum registered URI handlers.

Definition at line 78 of file ssl_server.hpp.

◆ max_uri_len

size_t idfxx::http::ssl_server::config::max_uri_len = 0

Maximum URI length (0 = Kconfig default)

Definition at line 81 of file ssl_server.hpp.

◆ on_session_close

std::move_only_function<void(int) const> idfxx::http::ssl_server::config::on_session_close = {}

Called when a session is closed.

Definition at line 107 of file ssl_server.hpp.

◆ on_session_open

std::move_only_function<result<void>(int) const> idfxx::http::ssl_server::config::on_session_open = {}

Called when a new session is opened.

Return an error to reject.

Definition at line 105 of file ssl_server.hpp.

◆ priority

task_priority idfxx::http::ssl_server::config::priority = 5

Priority of the server task.

Definition at line 67 of file ssl_server.hpp.

◆ private_key

std::string idfxx::http::ssl_server::config::private_key = {}

Server private key (PEM format)

Definition at line 111 of file ssl_server.hpp.

◆ recv_wait_timeout

std::chrono::seconds idfxx::http::ssl_server::config::recv_wait_timeout {5}

Receive timeout.

Definition at line 84 of file ssl_server.hpp.

◆ send_wait_timeout

std::chrono::seconds idfxx::http::ssl_server::config::send_wait_timeout {5}

Send timeout.

Definition at line 85 of file ssl_server.hpp.

◆ server_cert

std::string idfxx::http::ssl_server::config::server_cert = {}

Server certificate (PEM format)

Definition at line 110 of file ssl_server.hpp.

◆ server_port

uint16_t idfxx::http::ssl_server::config::server_port = 443

HTTPS listening port.

Definition at line 72 of file ssl_server.hpp.

◆ session_tickets

bool idfxx::http::ssl_server::config::session_tickets = false

Enable TLS session tickets.

Definition at line 115 of file ssl_server.hpp.

◆ stack_size

size_t idfxx::http::ssl_server::config::stack_size = 10240

Stack size for the server task (10KB)

Definition at line 68 of file ssl_server.hpp.

◆ use_ecdsa_peripheral

bool idfxx::http::ssl_server::config::use_ecdsa_peripheral = false

Use ECDSA peripheral for key operations.

Definition at line 113 of file ssl_server.hpp.

◆ use_secure_element

bool idfxx::http::ssl_server::config::use_secure_element = false

Use secure element for key storage.

Definition at line 116 of file ssl_server.hpp.

◆ wildcard_uri_match

bool idfxx::http::ssl_server::config::wildcard_uri_match = false

Enable wildcard URI matching.

Definition at line 101 of file ssl_server.hpp.


The documentation for this struct was generated from the following file: