Files
libmicrohttpd/doc
Christian Grothoff fd94723863 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.
2014-10-29 19:50:58 +00:00
..
2013-12-21 16:28:54 +00:00
2014-02-18 18:57:32 +00:00
2013-03-29 17:26:02 +00:00
2008-11-04 06:50:27 +00:00
2013-03-29 17:31:45 +00:00
2013-03-29 17:31:45 +00:00
2013-03-29 17:23:10 +00:00
2013-06-25 12:47:41 +00:00
2014-10-29 19:50:58 +00:00
2014-02-19 06:22:45 +00:00
2013-03-29 17:31:45 +00:00