Adjusted default value of maximum connections

This commit is contained in:
Evgeny Grin (Karlson2k)
2023-11-01 13:51:45 +03:00
parent 6e98d63538
commit 5f8e3c9b93
2 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -77,7 +77,7 @@
* Default connection limit.
*/
#ifdef MHD_POSIX_SOCKETS
#define MHD_MAX_CONNECTIONS_DEFAULT (FD_SETSIZE - 4)
#define MHD_MAX_CONNECTIONS_DEFAULT (FD_SETSIZE - 3 - 1 - MHD_ITC_NUM_FDS_)
#else
#define MHD_MAX_CONNECTIONS_DEFAULT (FD_SETSIZE - 2)
#endif
+14
View File
@@ -61,6 +61,10 @@
#include <errno.h>
#endif
/**
* Number of FDs used by every ITC.
*/
#define MHD_ITC_NUM_FDS_ (1)
/**
* Initialise ITC by generating eventFD
@@ -155,6 +159,11 @@ static const uint64_t _MHD_itc_wr_data = 1;
#endif
/**
* Number of FDs used by every ITC.
*/
#define MHD_ITC_NUM_FDS_ (2)
/**
* Initialise ITC by generating pipe
* @param itc the itc to initialise
@@ -256,6 +265,11 @@ MHD_itc_nonblocking_ (struct MHD_itc_ itc);
#include "mhd_sockets.h"
/**
* Number of FDs used by every ITC.
*/
#define MHD_ITC_NUM_FDS_ (2)
/**
* Initialise ITC by generating socketpair
* @param itc the itc to initialise