[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] branch master updated: Optimized the functi
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] branch master updated: 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. |
Date: |
Thu, 06 Dec 2018 17:09:54 +0100 |
This is an automated email from the git hooks/post-receive script.
silvioprog pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new b2203036 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.
b2203036 is described below
commit b220303691d627ca3cfe0d949c6aa2257b722c60
Author: silvioprog <address@hidden>
AuthorDate: Thu Dec 6 12:54:00 2018 -0300
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.
---
ChangeLog | 7 ++++++-
src/lib/mhd_limits.h | 8 ++++++++
src/lib/response_from_fd.c | 2 +-
src/microhttpd/mhd_limits.h | 8 ++++++++
src/microhttpd/response.c | 2 +-
5 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0f401a6b..6f27395d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-Thu Dec 6 02:11:15 -03 2018
+Thu Dec 6 12:50:11 BRT 2018
+ 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. -SC
+
+Thu Dec 6 02:11:15 BRT 2018
Referenced the gnutls_load_file() function in the HTTPs examples. -SC
Wed Dec 5 18:08:59 CET 2018
diff --git a/src/lib/mhd_limits.h b/src/lib/mhd_limits.h
index 1b0f5d7d..41d33a8f 100644
--- a/src/lib/mhd_limits.h
+++ b/src/lib/mhd_limits.h
@@ -143,4 +143,12 @@
#endif /* _WIN32 */
#endif /* !TIMEVAL_TV_SEC_MAX */
+#ifndef MHD_FD_BLOCK_SIZE
+#ifdef _WIN32
+#define MHD_FD_BLOCK_SIZE 16384 /* 16k */
+#else /* _WIN32 */
+#define MHD_FD_BLOCK_SIZE 4096 /* 4k */
+#endif /* _WIN32 */
+#endif /* !MHD_FD_BLOCK_SIZE */
+
#endif /* MHD_LIMITS_H */
diff --git a/src/lib/response_from_fd.c b/src/lib/response_from_fd.c
index cdeb7aa5..6eac3f7f 100644
--- a/src/lib/response_from_fd.c
+++ b/src/lib/response_from_fd.c
@@ -182,7 +182,7 @@ MHD_response_from_fd (enum MHD_HTTP_StatusCode sc,
response = MHD_response_from_callback (sc,
size,
- 4 * 1024,
+ MHD_FD_BLOCK_SIZE,
&file_reader,
NULL,
&free_callback);
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 @@
#endif /* _WIN32 */
#endif /* !TIMEVAL_TV_SEC_MAX */
+#ifndef MHD_FD_BLOCK_SIZE
+#ifdef _WIN32
+#define MHD_FD_BLOCK_SIZE 16384 /* 16k */
+#else /* _WIN32 */
+#define MHD_FD_BLOCK_SIZE 4096 /* 4k */
+#endif /* _WIN32 */
+#endif /* !MHD_FD_BLOCK_SIZE */
+
#endif /* MHD_LIMITS_H */
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index 21e23a8a..29edef4f 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -566,7 +566,7 @@ MHD_create_response_from_fd_at_offset64 (uint64_t size,
return NULL;
response = MHD_create_response_from_callback (size,
- 4 * 1024,
+ MHD_FD_BLOCK_SIZE,
&file_reader,
NULL,
&free_callback);
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [libmicrohttpd] branch master updated: 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.,
gnunet <=