diff --git a/trunk/darkhttpd.c b/trunk/darkhttpd.c index 5d2d38f..00e5e09 100644 --- a/trunk/darkhttpd.c +++ b/trunk/darkhttpd.c @@ -44,6 +44,7 @@ static const int debug = 1; #include #include #include +#include #include #include #include @@ -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)