|
Network System 0.1.1
High-performance modular networking library for scalable client-server applications
|
Namespaces | |
| namespace | adapters |
Classes | |
| struct | cookie |
| Represents an HTTP cookie. More... | |
| class | dtls_socket |
| A wrapper around ASIO UDP socket with OpenSSL DTLS encryption. More... | |
| struct | http_error |
| Structured HTTP error information. More... | |
| class | http_error_response |
| Builder for HTTP error responses. More... | |
| class | http_parser |
| Parser and serializer for HTTP messages (requests and responses) More... | |
| struct | http_request |
| Represents an HTTP request message. More... | |
| struct | http_response |
| Represents an HTTP response message. More... | |
| struct | multipart_file |
| Represents a file uploaded via multipart/form-data. More... | |
| struct | parse_error |
| Detailed HTTP parsing error information. More... | |
| class | quic_socket |
| A QUIC socket that wraps UDP and integrates QUIC packet protection. More... | |
| class | secure_tcp_socket |
A lightweight wrapper around asio::ssl::stream<asio::ip::tcp::socket>, enabling asynchronous TLS/SSL encrypted read and write operations. More... | |
| struct | socket_config |
| Configuration for TCP socket backpressure control. More... | |
| struct | socket_metrics |
| Runtime metrics for socket monitoring. More... | |
| class | tcp_socket |
A lightweight wrapper around asio::ip::tcp::socket, enabling asynchronous read and write operations. More... | |
| struct | tls_config |
| Configuration for TLS/SSL connections. More... | |
| class | udp_socket |
A lightweight wrapper around asio::ip::udp::socket, enabling asynchronous datagram operations. More... | |
| class | websocket_frame |
| Provides WebSocket frame encoding and decoding functionality. More... | |
| class | websocket_handshake |
| Implements WebSocket HTTP/1.1 upgrade handshake (RFC 6455). More... | |
| class | websocket_protocol |
| WebSocket protocol handler for message processing. More... | |
| class | websocket_socket |
| WebSocket framing layer built on top of tcp_socket. More... | |
| struct | ws_frame_header |
| Represents a decoded WebSocket frame header. More... | |
| struct | ws_handshake_result |
| Result of a WebSocket handshake operation. More... | |
| struct | ws_message |
| Represents a complete WebSocket message. More... | |
Typedefs | |
| template<typename T > | |
| using | Result = ::kcenon::network::Result<T> |
| using | VoidResult = ::kcenon::network::VoidResult |
| using | error_info = ::kcenon::network::error_info |
Functions | |
| auto | get_error_status_text (http_error_code code) -> std::string_view |
| Get status text for HTTP error code. | |
| auto | http_method_to_string (http_method method) -> std::string |
| Convert HTTP method enum to string. | |
| auto | string_to_http_method (const std::string &method_str) -> ::kcenon::network::internal::Result< http_method > |
| Convert string to HTTP method enum. | |
| auto | http_version_to_string (http_version version) -> std::string |
| Convert HTTP version enum to string. | |
| auto | string_to_http_version (const std::string &version_str) -> ::kcenon::network::internal::Result< http_version > |
| Convert string to HTTP version enum. | |
| auto | get_status_message (int status_code) -> std::string |
| Get HTTP status message for a status code. | |
| static auto | escape_json_string (const std::string &input) -> std::string |
| static auto | escape_html_string (const std::string &input) -> std::string |
| const char * | openssl_version_string () noexcept |
| Get OpenSSL version string. | |
| std::string | get_openssl_error () noexcept |
| Get last OpenSSL error as string. | |
| void | clear_openssl_errors () noexcept |
| Clear all OpenSSL errors from the thread's error queue. | |
Variables | |
| constexpr std::size_t | default_buffer_size = 4096 |
| constexpr std::size_t | default_timeout_ms = 5000 |
| constexpr std::string_view | default_client_id = "default_client" |
| constexpr std::string_view | default_server_id = "default_server" |
| constexpr std::string_view | default_tls_cipher_list |
Definition at line 171 of file result_types.h.
| using kcenon::network::internal::Result = ::kcenon::network::Result<T> |
Definition at line 169 of file result_types.h.
Definition at line 170 of file result_types.h.
|
strong |
Certificate verification modes.
| Enumerator | |
|---|---|
| none | No verification (insecure, testing only) |
| verify_peer | Verify peer certificate |
| verify_fail_if_no_peer_cert | Fail if peer doesn't provide cert |
Definition at line 124 of file common_defs.h.
|
strong |
Represents a simple enumeration for differentiating data transmission modes.
A higher-level code might use these to switch between packet-based, file-based, or binary data logic. They are optional stubs and can be extended as needed.
| Enumerator | |
|---|---|
| packet_mode | Regular messaging/packet mode. |
| file_mode | File transfer mode. |
| binary_mode | Raw binary data mode. |
Definition at line 100 of file common_defs.h.
|
strong |
Standard HTTP error codes (RFC 7231)
Definition at line 19 of file http_error.h.
|
strong |
HTTP request methods (verbs)
Note: Uses HTTP_ prefix to avoid conflicts with Windows macros (DELETE)
| Enumerator | |
|---|---|
| HTTP_GET | |
| HTTP_POST | |
| HTTP_PUT | |
| HTTP_DELETE | |
| HTTP_HEAD | |
| HTTP_OPTIONS | |
| HTTP_PATCH | |
| HTTP_CONNECT | |
| HTTP_TRACE | |
Definition at line 23 of file http_types.h.
|
strong |
HTTP protocol version.
| Enumerator | |
|---|---|
| HTTP_1_0 | |
| HTTP_1_1 | |
| HTTP_2_0 | |
Definition at line 40 of file http_types.h.
|
strong |
Types of HTTP parsing errors.
| Enumerator | |
|---|---|
| invalid_method | |
| invalid_uri | |
| invalid_version | |
| invalid_header | |
| incomplete_headers | |
| incomplete_body | |
| body_too_large | |
| header_too_large | |
| malformed_request | |
Definition at line 116 of file http_error.h.
|
strong |
QUIC connection state machine states.
Definition at line 40 of file quic_socket.h.
|
strong |
Role of the QUIC endpoint (client or server)
| Enumerator | |
|---|---|
| client | |
| server | |
Definition at line 30 of file quic_socket.h.
|
strong |
TLS protocol versions.
Specifies which TLS version to use for secure connections. Modern applications should use TLS 1.2 or 1.3.
| Enumerator | |
|---|---|
| tls_1_0 | TLS 1.0 (deprecated, insecure) |
| tls_1_1 | TLS 1.1 (deprecated, insecure) |
| tls_1_2 | TLS 1.2 (secure, widely supported) |
| tls_1_3 | TLS 1.3 (most secure, recommended) |
Definition at line 113 of file common_defs.h.
|
strong |
WebSocket close status codes (RFC 6455 Section 7.4).
These codes indicate the reason for closing the WebSocket connection.
Definition at line 60 of file websocket_protocol.h.
|
strong |
Type of WebSocket message.
WebSocket supports two types of data messages: text (UTF-8) and binary.
| Enumerator | |
|---|---|
| text | Text message (UTF-8 encoded) |
| binary | Binary message. |
Definition at line 23 of file websocket_protocol.h.
|
strong |
WebSocket frame operation codes as defined in RFC 6455.
These opcodes indicate the type of data contained in a WebSocket frame. The values are from the WebSocket protocol specification.
| Enumerator | |
|---|---|
| continuation | Continuation frame. |
| text | Text frame (UTF-8 encoded) |
| binary | Binary frame. |
| close | Connection close frame. |
| ping | Ping frame. |
| pong | Pong frame. |
Definition at line 21 of file websocket_frame.h.
|
strong |
WebSocket connection state (RFC 6455 Section 7).
Tracks the lifecycle of a WebSocket connection from initial connection through the closing handshake.
| Enumerator | |
|---|---|
| connecting | Handshake in progress. |
| open | Connection established and ready. |
| closing | Close handshake initiated. |
| closed | Connection closed. |
Definition at line 32 of file websocket_socket.h.
|
inlinenoexcept |
Clear all OpenSSL errors from the thread's error queue.
This should be called before operations where you want to check for fresh errors.
Definition at line 115 of file openssl_compat.h.
|
static |
Definition at line 151 of file http_error.cpp.
Referenced by kcenon::network::internal::http_error_response::build_html_error().

|
static |
Definition at line 106 of file http_error.cpp.
Referenced by kcenon::network::internal::http_error_response::build_json_error().

| auto kcenon::network::internal::get_error_status_text | ( | http_error_code | code | ) | -> std::string_view |
Get status text for HTTP error code.
| code | HTTP error code |
Definition at line 13 of file http_error.cpp.
References bad_gateway, bad_request, conflict, expectation_failed, failed_dependency, forbidden, gateway_timeout, gone, http_version_not_supported, im_a_teapot, insufficient_storage, internal_server_error, length_required, locked, loop_detected, method_not_allowed, misdirected_request, network_authentication_required, not_acceptable, not_extended, not_found, not_implemented, payload_too_large, payment_required, precondition_failed, precondition_required, proxy_authentication_required, range_not_satisfiable, request_header_fields_too_large, request_timeout, service_unavailable, too_early, too_many_requests, unauthorized, unavailable_for_legal_reasons, unprocessable_entity, unsupported_media_type, upgrade_required, uri_too_long, and variant_also_negotiates.
Referenced by kcenon::network::internal::http_error_response::build_html_error(), kcenon::network::internal::http_error_response::build_json_error(), and kcenon::network::internal::http_error_response::make_error().

|
inlinenoexcept |
Get last OpenSSL error as string.
This function works consistently across OpenSSL versions.
Definition at line 97 of file openssl_compat.h.
| auto kcenon::network::internal::get_status_message | ( | int | status_code | ) | -> std::string |
Get HTTP status message for a status code.
| status_code | HTTP status code |
Definition at line 177 of file http_types.cpp.
Referenced by kcenon::network::internal::http_parser::parse_status_line().

| auto kcenon::network::internal::http_method_to_string | ( | http_method | method | ) | -> std::string |
Convert HTTP method enum to string.
| method | HTTP method enum value |
Definition at line 114 of file http_types.cpp.
References HTTP_CONNECT, HTTP_DELETE, HTTP_GET, HTTP_HEAD, HTTP_OPTIONS, HTTP_PATCH, HTTP_POST, HTTP_PUT, and HTTP_TRACE.
Referenced by kcenon::network::internal::http_parser::serialize_request().

| auto kcenon::network::internal::http_version_to_string | ( | http_version | version | ) | -> std::string |
Convert HTTP version enum to string.
| version | HTTP version enum value |
Definition at line 153 of file http_types.cpp.
References HTTP_1_0, HTTP_1_1, HTTP_2_0, and kcenon::network::version().
Referenced by kcenon::network::internal::http_parser::serialize_chunked_response(), kcenon::network::internal::http_parser::serialize_request(), and kcenon::network::internal::http_parser::serialize_response().


|
inlinenoexcept |
Get OpenSSL version string.
Definition at line 86 of file openssl_compat.h.
| auto kcenon::network::internal::string_to_http_method | ( | const std::string & | method_str | ) | -> ::kcenon::network::internal::Result<http_method> |
Convert string to HTTP method enum.
| method_str | Method string (e.g., "GET", "POST") |
Possible errors:
Definition at line 131 of file http_types.cpp.
References HTTP_CONNECT, HTTP_DELETE, HTTP_GET, HTTP_HEAD, HTTP_OPTIONS, HTTP_PATCH, HTTP_POST, HTTP_PUT, HTTP_TRACE, and kcenon::network::error_codes::common_errors::invalid_argument.
Referenced by kcenon::network::internal::http_parser::parse_request_line().

| auto kcenon::network::internal::string_to_http_version | ( | const std::string & | version_str | ) | -> ::kcenon::network::internal::Result<http_version> |
Convert string to HTTP version enum.
| version_str | Version string (e.g., "HTTP/1.1") |
Possible errors:
Definition at line 164 of file http_types.cpp.
References HTTP_1_0, HTTP_1_1, HTTP_2_0, and kcenon::network::error_codes::common_errors::invalid_argument.
Referenced by kcenon::network::internal::http_parser::parse_request_line(), and kcenon::network::internal::http_parser::parse_status_line().

|
inlineconstexpr |
Definition at line 280 of file common_defs.h.
|
inlineconstexpr |
Definition at line 282 of file common_defs.h.
|
inlineconstexpr |
Definition at line 283 of file common_defs.h.
|
inlineconstexpr |
Definition at line 281 of file common_defs.h.
|
inlineconstexpr |
Definition at line 286 of file common_defs.h.