]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Define NET_BLOCK_SIZE.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Tue, 22 May 2018 07:42:00 +0000 (09:42 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 23 May 2018 13:38:40 +0000 (13:38 +0000)
This defines the default size for data blocks transferred over the network. It
should be large enough to guarantee filling up the TCP window (for efficiency),
while still preventing sending much data while the peer has already rejected
the rest of the transfer.

src/lib/compat.h

index 818af475b3d088e811adb48dcec4d5a11576f23c..dbda02f809cd8278856da4e4853898921b4e6504 100644 (file)
@@ -295,6 +295,10 @@ int fdatasync(int);
 #ifndef IO_BLOCK_SIZE
 #  define IO_BLOCK_SIZE 8192
 #endif
+/* Default size for data blocks transferred over the network */
+#ifndef NET_BLOCK_SIZE
+#  define NET_BLOCK_SIZE (128*1024)
+#endif
 
 #if !defined(PIPE_BUF) && defined(_POSIX_PIPE_BUF)
 #  define PIPE_BUF (8 * _POSIX_PIPE_BUF) /* for HURD */