mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
Implement disabling TCP_NODELAY, but comment it out.
It makes performance worse.
This commit is contained in:
parent
008f6f5d4e
commit
3e96ddf6d6
@ -44,6 +44,7 @@ static const int debug = 1;
|
||||
#include <sys/wait.h>
|
||||
#include <sys/param.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
@ -872,6 +873,14 @@ static void init_sockin(void)
|
||||
&sockopt, sizeof(sockopt)) == -1)
|
||||
err(1, "setsockopt(SO_REUSEADDR)");
|
||||
|
||||
#if 0
|
||||
/* disable Nagle since we buffer everything ourselves */
|
||||
sockopt = 1;
|
||||
if (setsockopt(sockin, IPPROTO_TCP, TCP_NODELAY,
|
||||
&sockopt, sizeof(sockopt)) == -1)
|
||||
err(1, "setsockopt(TCP_NODELAY)");
|
||||
#endif
|
||||
|
||||
#ifdef TORTURE
|
||||
/* torture: cripple the kernel-side send buffer so we can only squeeze out
|
||||
* one byte at a time (this is for debugging)
|
||||
|
Loading…
Reference in New Issue
Block a user