|
From: | silvioprog |
Subject: | Re: [libmicrohttpd] Why MHD latency is so high on Windows? |
Date: | Tue, 17 Nov 2015 23:43:52 -0300 |
Hello Nils,
I can't found any `select.c` file and PlibC entry. :-/ Is this file available in the latest MHD release?
But, after your tip, I tried to debug the MHD sources, so I found a build flag called `TCP_FASTOPEN`, and after enable it in my cmake file, rebuilt the DLL and used the `MHD_USE_TCP_FASTOPEN` option in my app, the latency problem as solved, went down to about 3 and 5 ms. However, see this part of the MHD doc:
MHD_USE_TCP_FASTOPEN
Enable TCP_FASTOPEN on the listen socket. TCP_FASTOPEN is currently supported on Linux >= 3.6. On other systems using this option with cause MHD_start_daemon to fail.
But when I enable this flag it works fine on Windows (7, 8 and 10). Is this doc topic outdate or is really wrong to enable this flag on Windows? I just did a cast at the line 4030 of the `daemon.c` file to avoid compiler hints:
if (0 != setsockopt (socket_fd,
IPPROTO_TCP, TCP_FASTOPEN,
(const char *) &daemon->fastopen_queue_size,
sizeof (daemon->fastopen_queue_size)))
Does anyone have problem using this flag on Windows? If not, it should be interesting to update the *FASTOPEN doc topic.
On Mon, Nov 16, 2015 at 5:23 PM, Nils Durner <address@hidden> wrote:
[Prev in Thread] | Current Thread | [Next in Thread] |