Set TCP_NODELAY on P2P sockets.

Nagle appears to be a significant contributor to latency now that the static
 sleeps are gone.  Most of our messages are relatively large compared to
 IP + TCP so I do not expect this to create enormous overhead.

This may also reduce traffic burstyness somewhat.
This commit is contained in:
Gregory Maxwell
2015-10-21 23:52:29 +00:00
parent 0fbfc5106c
commit a4e28b3d1e
3 changed files with 21 additions and 1 deletions

View File

@@ -38,6 +38,7 @@
#include <sys/types.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <ifaddrs.h>
#include <limits.h>