diff options
author | silvioprog <silvioprog@gmail.com> | 2018-12-06 12:54:00 -0300 |
---|---|---|
committer | silvioprog <silvioprog@gmail.com> | 2018-12-06 12:54:00 -0300 |
commit | b220303691d627ca3cfe0d949c6aa2257b722c60 (patch) | |
tree | 76cb426d1ef26437464d86313ce25fc9ea98898f /src/microhttpd/mhd_limits.h | |
parent | 53674dcdfba0ade96b50672a709edae1eae0323a (diff) | |
download | libmicrohttpd-b220303691d627ca3cfe0d949c6aa2257b722c60.tar.gz libmicrohttpd-b220303691d627ca3cfe0d949c6aa2257b722c60.zip |
Optimized the function MHD_create_response_from_callback() for Windows by increasing its internal buffer size and allowed to customize it via macro MHD_FD_BLOCK_SIZE.
Diffstat (limited to 'src/microhttpd/mhd_limits.h')
-rw-r--r-- | src/microhttpd/mhd_limits.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/microhttpd/mhd_limits.h b/src/microhttpd/mhd_limits.h index 1b0f5d7d..41d33a8f 100644 --- a/src/microhttpd/mhd_limits.h +++ b/src/microhttpd/mhd_limits.h | |||
@@ -143,4 +143,12 @@ | |||
143 | #endif /* _WIN32 */ | 143 | #endif /* _WIN32 */ |
144 | #endif /* !TIMEVAL_TV_SEC_MAX */ | 144 | #endif /* !TIMEVAL_TV_SEC_MAX */ |
145 | 145 | ||
146 | #ifndef MHD_FD_BLOCK_SIZE | ||
147 | #ifdef _WIN32 | ||
148 | #define MHD_FD_BLOCK_SIZE 16384 /* 16k */ | ||
149 | #else /* _WIN32 */ | ||
150 | #define MHD_FD_BLOCK_SIZE 4096 /* 4k */ | ||
151 | #endif /* _WIN32 */ | ||
152 | #endif /* !MHD_FD_BLOCK_SIZE */ | ||
153 | |||
146 | #endif /* MHD_LIMITS_H */ | 154 | #endif /* MHD_LIMITS_H */ |