]> 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)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Mon, 28 May 2018 06:10:46 +0000 (09:10 +0300)
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 af6c914dd8244208e887b11e73cac0c9b0dc7ac7..d287b6572ced99e19173c1a064e43daead669f54 100644 (file)
@@ -294,6 +294,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 */