diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-06-17 20:26:41 +0200 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-06-25 08:01:47 +0000 |
commit | 0d394e2aaee3fbbebd148c373630a6ecbc3b3592 (patch) | |
tree | 0ad2efe56583d410091b6c12cdd4e88040a360bf | |
parent | 77db4d16b1ae42045785bd3c6a00fa969f08fb6a (diff) | |
download | libmicrohttpd-0d394e2aaee3fbbebd148c373630a6ecbc3b3592.tar.gz libmicrohttpd-0d394e2aaee3fbbebd148c373630a6ecbc3b3592.zip |
startingpoint
-rw-r--r-- | src/microhttpd/mhd_send.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c index df276f00..252e5e86 100644 --- a/src/microhttpd/mhd_send.c +++ b/src/microhttpd/mhd_send.c | |||
@@ -93,6 +93,31 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
93 | /* s: the socket. */ | 93 | /* s: the socket. */ |
94 | MHD_socket s = connection->socket_fd; | 94 | MHD_socket s = connection->socket_fd; |
95 | 95 | ||
96 | bool want_cork; | ||
97 | bool have_cork; | ||
98 | bool have_more; | ||
99 | |||
100 | switch (options) | ||
101 | { | ||
102 | case MHD_SSO_NO_CORK: | ||
103 | want_cork = false; | ||
104 | break; | ||
105 | case MHD_SSO_MAY_CORK: | ||
106 | want_cork = true; | ||
107 | break; | ||
108 | case MHD_SSO_HDR_CORK: | ||
109 | want_cork = (buffer_size >= 1024) && (buffer_size <= 1220); | ||
110 | break; | ||
111 | } | ||
112 | have_cork = ! connection->sk_tcp_nodelay_on; | ||
113 | #ifdef MSG_MORE | ||
114 | have_more = true; | ||
115 | #else | ||
116 | have_more = false; | ||
117 | #endif | ||
118 | |||
119 | |||
120 | |||
96 | /* Get socket options, change/set options if necessary. */ | 121 | /* Get socket options, change/set options if necessary. */ |
97 | switch (options) | 122 | switch (options) |
98 | { | 123 | { |