-
Notifications
You must be signed in to change notification settings - Fork 704
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cool#9833: Mitigate connection count limitation, fix timeout-checking…
… code (*WIP*) This commit is a WIP, pushed for discussion and to be amended. - ProtocolHandlerInterface::checkTimeout(..) - Add bool return value: true -> shutdown connection, caller shall stop processing - Implemented for http::Session - Timeout (30s) with missing response - Implemented for WebSocketHandler - Timeout (64s = SocketPoll::DefaultPollTimeoutMicroS) after missing pong (server only) - StreamSocket -> Socket (properties moved) - bytes sent/received - closed state - Socket (added properties) - creation- and last-seen -time - socket type and port - checkForcedRemoval(..) *WIP* - called directly from SocketPoll::poll() - only for IPv4/v6 network connections - similar to ProtocolHandlerInterface::checkTimeout(..) - added further criteria (age, throughput, ..) - Timeout (64s = SocketPoll::DefaultPollTimeoutMicroS) if (now - lastSeen) > timeout - Timeout (12 hours) if (now - creationTime) > timeout - TODO: Add maximimal IPv4/IPv6 socket-count criteria, drop oldest. - SocketPoll::poll() - Additionally erases if !socket->isOpen() || socket->checkForcedRemoval() - TODO - Facility to configure timeouts, at least for testing! - More elaborated tests - WebSocket - .. Signed-off-by: Sven Göthel <[email protected]> Change-Id: I7e1a9329e0848c40a210f6250e29e26950da6fbc
- Loading branch information
Sven Göthel
committed
Aug 28, 2024
1 parent
595257b
commit a2c3068
Showing
9 changed files
with
507 additions
and
101 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.