[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 131/154: toggle Naggle if and only if corki
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 131/154: toggle Naggle if and only if corking is not possible by other means |
Date: |
Mon, 19 Aug 2019 10:17:23 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository libmicrohttpd.
commit 4b62caead6edb2d4b75ef1c99e653d4b30ac9007
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Aug 1 20:50:35 2019 +0200
toggle Naggle if and only if corking is not possible by other means
---
src/microhttpd/mhd_send.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
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,
/* any others? man page does not list more... */
break;
}
+#else
+ /* CORK/NOPUSH/MSG_MORE do not exist on this platform,
+ so we must toggle Naggle's algorithm on/off instead
+ (otherwise we keep it always off) */
+ if (connection->sk_cork_on == want_cork)
+ {
+ /* nothing to do, success! */
+ return;
+ }
+ if ( (want_cork) &&
+ (0 == MHD_socket_set_nodelay (connection->socket_fd,
+ false)) )
+ connection->sk_cork_on = true;
#endif
}
@@ -148,6 +161,19 @@ post_cork_setsockopt (struct MHD_Connection *connection,
/* any others? man page does not list more... */
break;
}
+#else
+ /* CORK/NOPUSH/MSG_MORE do not exist on this platform,
+ so we must toggle Naggle's algorithm on/off instead
+ (otherwise we keep it always off) */
+ if (connection->sk_cork_on == want_cork)
+ {
+ /* nothing to do, success! */
+ return;
+ }
+ if ( (! want_cork) &&
+ (0 == MHD_socket_set_nodelay (connection->socket_fd,
+ true)) )
+ connection->sk_cork_on = false;
#endif
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [libmicrohttpd] 119/154: attempt configure fix, (continued)
- [GNUnet-SVN] [libmicrohttpd] 119/154: attempt configure fix, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 116/154: ack other authors, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 98/154: simplify, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 104/154: skcork, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 124/154: mhd_send commented,, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 127/154: remove commentblock, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 112/154: configure.ac: define a check for HAVE_SENDMSG, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 121/154: MSG_MORE fix, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 115/154: gitignore build-aux., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 132/154: reduce variable scope, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 131/154: toggle Naggle if and only if corking is not possible by other means,
gnunet <=
- [GNUnet-SVN] [libmicrohttpd] 126/154: fixes, comments, FIXMEs, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 133/154: properly handle return value from send_on_connection2, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 130/154: always set nodelay, except if we cannot cork, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 135/154: add ways for application to control corking for upgraded sockets, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 138/154: mhd_send: fix failure to build, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 136/154: do it in both tests, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 139/154: Rename senfile_adapter to MHD_send_sendfile_ and remove duplicate prototype., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 151/154: mhd_send.c: for now, let EINVAL and EBADF fail hard., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 152/154: connection.c: remove dead code., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 154/154: Revert "connection.c: remove dead code.", gnunet, 2019/08/19