diff options
author | Daniel Nicoletti <daniel.nicoletti@kdab.com> | 2021-06-30 17:18:02 -0300 |
---|---|---|
committer | Daniel Nicoletti <daniel.nicoletti@kdab.com> | 2021-07-27 16:47:31 -0300 |
commit | 8f75ab231fafc136fef4b973f1241b9b2db30312 (patch) | |
tree | c634d4ba891a6d13f06368f502eba81f7f61e2ae /src/network/socket/qtcpserver.h | |
parent | e4fd86d53af3e7a949752f5558c137bb1c8c5fa6 (diff) |
Allow to set Local Socket listen(2) backlog
Unix sockets do not suffer from SYN flood, thus the hardcoded value to
50 is size of the only queue to hold connections to be accepted,
resulting in dropped connections when the limit is reached.
On Windows the hardcoded value is 8, this patch changes the default to
50 matching UNIX.
[ChangeLog][QtNetwork][QLocalServer] Added setListenBacklogSize() to
be able to have control over the listen backlog feature.
Change-Id: Iaee6349a46b75b0bd05e40e7ade5948f1cf9f407
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/network/socket/qtcpserver.h')
-rw-r--r-- | src/network/socket/qtcpserver.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/socket/qtcpserver.h b/src/network/socket/qtcpserver.h index c6f5eb3e7f..28bea2f9c7 100644 --- a/src/network/socket/qtcpserver.h +++ b/src/network/socket/qtcpserver.h @@ -69,8 +69,8 @@ public: void setMaxPendingConnections(int numConnections); int maxPendingConnections() const; - void setListenBacklog(int size); - int listenBacklog() const; + void setListenBacklogSize(int size); + int listenBacklogSize() const; quint16 serverPort() const; QHostAddress serverAddress() const; |