Rename MAX_BUFFER_SIZE

MAX_BUFFER_SIZE, which is used for limiting the amount of the data
read from a socket renamed to MXS_MAX_NW_READ_BUFFER_SIZE and moved
from gw.h to limits.h.

Consider removing altogether. Difficult to justify since non-blocking
reads are used and the amount of available data is known.
This commit is contained in:
Johan Wikman
2016-10-17 10:24:32 +03:00
parent 8aafa34d66
commit b27774e674
4 changed files with 15 additions and 8 deletions

View File

@ -38,9 +38,6 @@
MXS_BEGIN_DECLS
// network buffer is 32K
#define MAX_BUFFER_SIZE 32768
#define GW_NOINTR_CALL(A) do { errno = 0; A; } while (errno == EINTR)
bool gw_daemonize(void);

View File

@ -33,7 +33,7 @@ MXS_BEGIN_DECLS
#define MXS_BACKEND_SO_RCVBUF (128 * 1024)
/**
* MSX_BACKEND_SO_SNDBUF
* MXS_BACKEND_SO_SNDBUF
*
* The value used when setting SO_SNDBUF of backend sockets.
*/
@ -53,6 +53,16 @@ MXS_BEGIN_DECLS
*/
#define MXS_CLIENT_SO_SNDBUF (128 * 1024)
/**
* MXS_MAX_NW_READ_BUFFER_SIZE
*
* The maximum amount of data read in one gofrom a client DCB.
*
* TODO: Consider removing altogether so that we always read
* whatever is available in the socket.
*/
#define MXS_MAX_NW_READ_BUFFER_SIZE (32 * 1024)
/**
* MXS_MAX_THREADS
*