[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 07/154: provide example for use of getsocko
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 07/154: provide example for use of getsockopt to get MSS |
Date: |
Mon, 19 Aug 2019 10:15:19 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository libmicrohttpd.
commit 8289ed69b7c77305a32ea1a9803d26f8f85898a1
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Jun 17 20:09:52 2019 +0200
provide example for use of getsockopt to get MSS
---
src/microhttpd/mhd_send.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 4af5680c..70a9bc16 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -102,7 +102,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
{
opt1 = 1;
opt2 = sizeof (int);
- /*
+ /*
* TODO: It is possible that Solaris/SunOS depending on
* the linked library needs a different setsockopt usage:
*
https://stackoverflow.com/questions/48670299/setsockopt-usage-in-linux-and-solaris-invalid-argument-in-solaris
@@ -131,7 +131,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
*/
if (! connection->sk_tcp_cork_nopush_on)
{
- /*
+ /*
* corking boolean is false. We want to enable
* Corking then.
*/
@@ -286,8 +286,19 @@ MHD_send_on_connection2_ (struct MHD_Connection
*connection,
// return -1
// return numBytes
// -- </pseudo>
- struct tcp_info *tcp_;
+ struct tcp_info tcp_;
size_t opt1, opt2, length;
+
+ if (0 ==
+ getsockopt (connection->socket,
+ TCP_INFO,
+ IPPROTO_TCP,
+ &tcp_,
+ sizeof (tcp_)))
+ {
+ // mss = tcp_.tcpi_snd_mss;
+ }
+
switch (MHD_SendSocketOptions)
{
case MHD_SSO_NO_CORK:
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [libmicrohttpd] branch master updated (316f6ab3 -> e82de750), gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 01/154: mhd_send: Add initial version., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 04/154: mhd_send: minor typo, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 02/154: mhd_send, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 03/154: mhd_send: fix switch., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 05/154: mhd_send: remove unnecessary comments., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 08/154: fix syntax, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 06/154: mhd_send: Move return_bytes related code into the right place., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 07/154: provide example for use of getsockopt to get MSS,
gnunet <=
- [GNUnet-SVN] [libmicrohttpd] 09/154: startingpoint, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 14/154: mhd_send.c: Try to guess the right branch to close., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 17/154: mhd_send: start adding logic from send_param_adapter., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 12/154: Add mhd_send to Makefile, more fixes in mhd_send., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 20/154: mhd_send.c: variable declarations (style)., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 19/154: adjust, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 11/154: restructure a bit to reuse existing send function, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 23/154: mhd_send: change send_tls_adapter() to non-static and export its prototype, use it in mhd_send.c, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 22/154: mhd_send.c: call send_tls_adapter() when TLS is used., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 24/154: move TLS branch to right position, gnunet, 2019/08/19