258 config.enable_session_resumption =
true;
274 config.enable_session_resumption =
true;
287 "ECDHE-RSA-AES256-GCM-SHA384:"
288 "ECDHE-RSA-AES128-GCM-SHA256:"
289 "ECDHE-RSA-CHACHA20-POLY1305";
constexpr std::string_view default_server_id
tls_version
TLS protocol versions.
data_mode
Represents a simple enumeration for differentiating data transmission modes.
constexpr std::string_view default_client_id
certificate_verification
Certificate verification modes.
@ verify_fail_if_no_peer_cert
constexpr std::string_view default_tls_cipher_list
constexpr std::size_t default_timeout_ms
constexpr std::size_t default_buffer_size
@ none
No congestion signal.
Configuration for TCP socket backpressure control.
std::size_t high_water_mark
High water mark - trigger backpressure callback.
std::size_t max_pending_bytes
Maximum bytes allowed in pending send buffer.
std::size_t low_water_mark
Low water mark - resume sending.
Runtime metrics for socket monitoring.
std::atomic< std::size_t > backpressure_events
std::atomic< std::size_t > total_bytes_received
std::atomic< std::size_t > peak_pending_bytes
std::atomic< std::size_t > rejected_sends
std::atomic< std::size_t > total_bytes_sent
std::atomic< std::size_t > send_count
std::atomic< std::size_t > receive_count
std::atomic< std::size_t > current_pending_bytes
Configuration for TLS/SSL connections.
std::optional< std::string > certificate_file
Path to server certificate file (PEM format) Required for servers when TLS is enabled.
std::optional< std::string > cipher_list
Cipher suite list (OpenSSL format) Default: Use strong ciphers (TLS 1.2+) Example: "ECDHE-RSA-AES256-...
static auto insecure_for_testing() -> tls_config
Creates a default insecure configuration (testing only)
static auto legacy_compatible() -> tls_config
Creates a backwards-compatible configuration (TLS 1.2+)
std::size_t handshake_timeout_ms
Timeout for TLS handshake in milliseconds.
auto is_valid() const -> bool
Validates the TLS configuration.
bool enabled
Enable TLS/SSL for this connection (default: false)
tls_version min_version
Minimum TLS version to accept (default: TLS 1.3) Note: TLS 1.3 is enforced by default to prevent down...
std::optional< std::string > sni_hostname
Server Name Indication (SNI) hostname for clients Used for virtual hosting and certificate selection.
std::optional< std::string > private_key_file
Path to server private key file (PEM format) Required for servers when TLS is enabled.
std::optional< std::string > ca_path
Path to directory containing CA certificates.
static auto secure_defaults() -> tls_config
Creates a secure default configuration.
std::optional< std::string > private_key_password
Password for encrypted private key (if applicable)
bool enable_session_resumption
Enable session resumption for performance.
std::optional< std::string > ca_file
Path to CA certificate file for verification (PEM format) Required when verify_mode !...
certificate_verification verify_mode
Certificate verification mode (default: verify_peer)