From: Stephan Bosch Date: Tue, 22 May 2018 07:42:00 +0000 (+0200) Subject: lib: Define NET_BLOCK_SIZE. X-Git-Tag: 2.3.2.rc1~102 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1fca10509d8865df8e3097e621943a7b795e202c;p=thirdparty%2Fdovecot%2Fcore.git lib: Define NET_BLOCK_SIZE. 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. --- diff --git a/src/lib/compat.h b/src/lib/compat.h index af6c914dd8..d287b6572c 100644 --- a/src/lib/compat.h +++ b/src/lib/compat.h @@ -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 */