Feature/issue #1077 Add TCP Socket Options for HTTP and WebSocket Connections - #1202
Open
jwolak wants to merge 15 commits into
Open
Feature/issue #1077 Add TCP Socket Options for HTTP and WebSocket Connections#1202jwolak wants to merge 15 commits into
jwolak wants to merge 15 commits into
Conversation
…ket connections
… update WebSocket options
…e related tests
…able/disable cases
…in HTTP and WebSocket connections
gittiver
reviewed
Jul 23, 2026
gittiver
reviewed
Jul 23, 2026
gittiver
reviewed
Jul 23, 2026
gittiver
reviewed
Jul 23, 2026
…7-configurable-tcp-socket-options
…cket connections
…on for connection validation
…lay_enabled_for_connection_after_apply for clarity
…TTP and WebSocket tests
gittiver
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements independent TCP socket option configuration for HTTP and WebSocket servers, resolving the requirement to differentiate between socket options for different server types.
HTTP and WebSocket connections have fundamentally different traffic patterns:
Previously, both protocols shared the same socket options. This implementation allows independent configuration while maintaining a clean, symmetric API.
Changes
include/crow/tcp_socket_options.hstruct tcp_socket_options- container for TCP optionsapply_tcp_socket_options()- applies options to TCP sockets with error handlingAPI Extensions
include/crow/app.htcp_nodelay(bool enabled = true)- configure HTTP TCP_NODELAYtcp_socket_options()- retrieve HTTP TCP settingswebsocket_tcp_nodelay(bool enabled = true)- configure WebSocket TCP_NODELAYwebsocket_tcp_socket_options()- retrieve WebSocket TCP settingstcp_socket_options_andwebsocket_tcp_socket_options_Integration
include/crow/websocket.htcp_optionsparameter toConnection::create()include/crow/routing.hwebsocket_tcp_socket_options()to connection factoryTest Coverage
tests/unittest.cppTest Cases
Compatibility / Impact
None. This is a purely additive feature with sensible defaults (TCP_NODELAY disabled for both).