From: adash Date: Wed, 25 Feb 2009 02:39:43 +0000 (+0000) Subject: set the TCP_NODELAY socket option X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=69bdeb70a38db3993c13db59f019a8b876a7ce19;p=IRC.git set the TCP_NODELAY socket option --- diff --git a/Robust/src/Runtime/socket.c b/Robust/src/Runtime/socket.c index 66f788de..e8aae96d 100644 --- a/Robust/src/Runtime/socket.c +++ b/Robust/src/Runtime/socket.c @@ -8,6 +8,7 @@ #include #endif #include +#include #include "SimpleHash.h" #include "GenericHashtable.h" @@ -295,6 +296,8 @@ int CALL02(___ServerSocket______nativeaccept____L___Socket___,struct ___ServerSo #endif #endif newfd=accept(fd, (struct sockaddr *)&sin, &sinlen); + int flag = 1; + setsockopt(newfd, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, sizeof(flag)); #if defined(THREADS)||defined(DSTM) #ifdef PRECISE_GC restartaftergc(tmp);