-
Notifications
You must be signed in to change notification settings - Fork 681
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cool#9833: Implement MaxConnection Limit and complete UnitTests
Adding connection limit where registered via SocketPoll::setLimiter(), i.e. DocumentBrokerPoll and WebServerPoll only. SocketPoll::poll() will drop _new_ overhead connections exceeding MaxConnections. This has been discussed, in favor of dropping the oldest connections. Aligned net::Config::MaxConnections w/ pre-existing MAX_CONNECTIONS and COOLWSD::MaxConnections. COOLWSD / net::Config - Aligned MAX_CONNECTIONS/COOLWSD::MaxConnections with config "net.maxconnections", net::Config::MaxConnections, having a minimum of 3 - defaults to 9999. SocketPoll::setLimiter(): - Increments given non-zero connectionLimit by one for WS upgrade socket. Added http::StatusCode::None(0), allowing to use for debugging Unit Tests: - Using base class UnitTimeoutBase for UnitTimeoutConnections + UnitTimeoutNone, - Testing http, ws-ping and wsd-chat-ping on multiple parallel connections w/ and w/o a connection limit - UnitTimeoutSocket tests socket max-duration on http + WS sessions - UnitTimeoutWSPing tests WS Ping (native frame) timeout limit on WS sessions Signed-off-by: Sven Göthel <[email protected]> Change-Id: I7e1a9329e0848c40a210f6250e29e26950da6fbc
- Loading branch information
Sven Göthel
committed
Sep 11, 2024
1 parent
eaf2439
commit b8ec82a
Showing
12 changed files
with
666 additions
and
268 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
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.