From: Stephan Bosch Date: Tue, 22 May 2018 07:42:00 +0000 (+0200) Subject: lib: Define NET_BLOCK_SIZE. X-Git-Tag: 2.3.9~1819 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0afc71435c25ab702db5e4a9058274bdd7145b4b;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 818af475b3..dbda02f809 100644 --- a/src/lib/compat.h +++ b/src/lib/compat.h @@ -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 */