aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/mhd_send.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/mhd_send.c')
-rw-r--r--src/microhttpd/mhd_send.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 9b07115c..5fed8767 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -90,6 +90,19 @@ pre_cork_setsockopt (struct MHD_Connection *connection,
90 /* any others? man page does not list more... */ 90 /* any others? man page does not list more... */
91 break; 91 break;
92 } 92 }
93#else
94 /* CORK/NOPUSH/MSG_MORE do not exist on this platform,
95 so we must toggle Naggle's algorithm on/off instead
96 (otherwise we keep it always off) */
97 if (connection->sk_cork_on == want_cork)
98 {
99 /* nothing to do, success! */
100 return;
101 }
102 if ( (want_cork) &&
103 (0 == MHD_socket_set_nodelay (connection->socket_fd,
104 false)) )
105 connection->sk_cork_on = true;
93#endif 106#endif
94} 107}
95 108
@@ -148,6 +161,19 @@ post_cork_setsockopt (struct MHD_Connection *connection,
148 /* any others? man page does not list more... */ 161 /* any others? man page does not list more... */
149 break; 162 break;
150 } 163 }
164#else
165 /* CORK/NOPUSH/MSG_MORE do not exist on this platform,
166 so we must toggle Naggle's algorithm on/off instead
167 (otherwise we keep it always off) */
168 if (connection->sk_cork_on == want_cork)
169 {
170 /* nothing to do, success! */
171 return;
172 }
173 if ( (! want_cork) &&
174 (0 == MHD_socket_set_nodelay (connection->socket_fd,
175 true)) )
176 connection->sk_cork_on = false;
151#endif 177#endif
152} 178}
153 179