From: Milan Straka <fox@ucw.cz>
Date: Wed, 29 Oct 2014 09:17:42 +0100
Subject: [PATCH 1/2] Split daemon->max_connections to connections and
 connection_limit.

In order to be able to return number of parallel connections, we need
to now both the actual number and the limit. Nevertheless, until now only
  max_connections = connection_limit - connections
was kept. We now store both the connection_limit and connections.


git-svn-id: https://gnunet.org/svn/libmicrohttpd@34386 140774ce-b5e7-0310-ab8b-a85725594a96
minor code clean up via CSE

git-svn-id: https://gnunet.org/svn/libmicrohttpd@34387 140774ce-b5e7-0310-ab8b-a85725594a96
From: Milan Straka <fox@ucw.cz>
Date: Wed, 29 Oct 2014 09:59:09 +0100
Subject: [PATCH 2/2] Add MHD_DAEMON_INFO_CURRENT_CONNECTIONS to
 MHD_DaemonInfoType.

The MHD_DAEMON_INFO_CURRENT_CONNECTIONS returns number of current
connections handled by the daemon.

Useful after MHD_quiesce_daemon to find out whether all connections
have been served.


git-svn-id: https://gnunet.org/svn/libmicrohttpd@34388 140774ce-b5e7-0310-ab8b-a85725594a96
-no comma at end of enum

git-svn-id: https://gnunet.org/svn/libmicrohttpd@34389 140774ce-b5e7-0310-ab8b-a85725594a96
make sure we always set non-zero errno in send_tls_adapter

git-svn-id: https://gnunet.org/svn/libmicrohttpd@34390 140774ce-b5e7-0310-ab8b-a85725594a96
handle bogus return value from send() call

git-svn-id: https://gnunet.org/svn/libmicrohttpd@34391 140774ce-b5e7-0310-ab8b-a85725594a96
Hi Christian,

I attach the first attempt on SO_REUSEPORT. The patch is available
either at https://github.com/foxik/libmicrohttpd/commit/9ce9422742e10458f87275ea202a982e00c2b88c
or attached. (It is against the version with
MHD_DAEMON_OPTION_CURRENT_CONNECTIONS, but I can rebase it to current
SVN HEAD if you want.)

It seems that a reasonably multiplatform way of detecting SO_REUSEPORT is
  #ifdef SO_REPOSEPORT
which is used for example by Perl. For SO_EXCLUSIVEADDRUSE, the same
strategy seems to work too, according to Windows SDK headers and MinGW
WinAPI headers.

The current patch adds an option to allowing/disallowing address:port
reuse. One remark:
- currently both nonexisting SO_xxx and setsockopt failure are fatal and
  MHD_start_daemon fails. That may be too harsh -- maybe the
  MHD_OPTION_LISTENING_ADDRESS_REUSE should be only a hint.

  Nevertheless, as one can freely not use
  MHD_OPTION_LISTENING_ADDRESS_REUSE option, I chose the "fail on error"
  behaviour.

Thanks,
cheers,
Milan Straka

Original patch modified to get rid of some redundant USE_DEBUG
checks, fix indentation, and #ifndef SO_REUSEPORT on Linux,
we try be #defining it to 15 ourselves.



git-svn-id: https://gnunet.org/svn/libmicrohttpd@34392 140774ce-b5e7-0310-ab8b-a85725594a96
-bump

git-svn-id: https://gnunet.org/svn/libmicrohttpd@34393 140774ce-b5e7-0310-ab8b-a85725594a96