[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] Consider allowing SO_REUSEPORT when requested
From: |
Christian Grothoff |
Subject: |
Re: [libmicrohttpd] Consider allowing SO_REUSEPORT when requested |
Date: |
Mon, 27 Oct 2014 17:58:55 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.8.1 |
Hi!
AFAIK the interpretations of what 'reuse port' means differ widely
between operating systems (especially W32 vs. POSIX, but possibly also
within POSIX). So adding that option to our API creates the issue that
we need to define a particular semantics and then apply it consistently
among all supported platforms --- and decide on how we should fail if
setting that option is not possible or fails (especially on exotic
platforms).
So if you had a (1) well-defined (semantics, errors), (2) reasonablly
portable (W32, iOS, BSD, Linux at least), and (3) well-documented,
including error conditions and handling implementation of this, I'd
strongly consider adding it.
Happy hacking!
Christian
On 10/27/2014 05:22 PM, Milan Straka wrote:
> Hi all,
>
> would you consider adding flag enabling SO_REUSEPORT on the listening
> socket? Something like MHD_OPTION_SO_REUSEPORT? A compilation option
> would probably have to be used to enable it.
>
> I understand I can open the listening socket myself and pass it using
> MHD_OPTION_LISTEN_SOCKET, but I think a HTTP server should allow using
> SO_REUSEPORT nowadays.
>
> Cheers,
> Milan Straka
>
signature.asc
Description: OpenPGP digital signature