summaryrefslogtreecommitdiff
path: root/socketft.h
diff options
context:
space:
mode:
authordenisbider <denisbider@users.noreply.github.com>2016-12-19 11:17:35 -0600
committerGitHub <noreply@github.com>2016-12-19 11:17:35 -0600
commitf3474ba157c7b928083d9bc8031f294cbd77609b (patch)
tree3155a44ca578f14ee4ffc80e7c6ffd8cde2aad7f /socketft.h
parentfa99ece0c5819823fcd82c6c59bdb11f5a203b65 (diff)
downloadcryptopp-git-f3474ba157c7b928083d9bc8031f294cbd77609b.tar.gz
Updated default Socket::Listen backlog parameter
Default backlog value was 5, which appears to stem back to the maximum supported by Windows Sockets 1. This was bound to cause problems for applications receiving many connections at the same time. Changed to SOMAXCONN, which is the standard way on Windows and POSIX to use a maximum reasonable backlog value.
Diffstat (limited to 'socketft.h')
-rw-r--r--socketft.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/socketft.h b/socketft.h
index af136d69..0fefb65c 100644
--- a/socketft.h
+++ b/socketft.h
@@ -72,7 +72,7 @@ public:
void Create(int nType = SOCK_STREAM);
void Bind(unsigned int port, const char *addr=NULL);
void Bind(const sockaddr* psa, socklen_t saLen);
- void Listen(int backlog=5);
+ void Listen(int backlog = SOMAXCONN);
// the next three functions return false if the socket is in nonblocking mode
// and the operation cannot be completed immediately
bool Connect(const char *addr, unsigned int port);