libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] Doubts regarding MHD_OPTION_CONNECTION_LIMIT default and


From: Fermín Galán Márquez
Subject: [libmicrohttpd] Doubts regarding MHD_OPTION_CONNECTION_LIMIT default and usage of 0
Date: Thu, 24 Nov 2016 20:20:32 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0

Hi,

From MHD documentation https://www.gnu.org/software/libmicrohttpd/manual/libmicrohttpd.html, the description of MHD_OPTION_CONNECTION_LIMIT is as follows:

"Maximum number of concurrent connections to accept (followed by an unsigned int). The default is FD_SETSIZE - 4 (the maximum number of file descriptors supported by select minus four for stdin, stdout, stderr and the server socket). In other words, the default is as large as possible."

I wonder to which number refers that FD_SETSIZE in the documentation. I mean:

  1. To the FD_SETSIZE at system library, which happens to be 1024, at least in my system looking to /usr/include/x86_64-linux-gnu/sys/select.h and /usr/include/x86_64-linux-gnu/bits/typesizes.h. I understand that in other system it could be different number from different system library .h, but always static and independent of the operating system configuration.
  2. To the actual file descriptors limit used by the operating system, e.g. the one that can be changed with ulimit. In this case, the setting is dynamic and I understand that the "maximum number of file descriptor" is taken at process (using MHD) starting time.

Which is the right one?

In addition, has 0 (as valid unsigned int) a meaning for this option? Or just it mus not be used? Not sure about this looking the documentation...

Thanks!

Best regards,

------

Fermín


reply via email to

[Prev in Thread] Current Thread [Next in Thread]