aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-11-23 17:50:15 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-11-24 19:07:34 +0300
commit85dbd8dc522a6dc83d64619d1cdf603ef9461dcc (patch)
tree4dab193ba3c26c8061a0a18e71e38e51185b0b08
parent52b7989822e20d4a33151b46acd765d532b06338 (diff)
downloadlibmicrohttpd-85dbd8dc522a6dc83d64619d1cdf603ef9461dcc.tar.gz
libmicrohttpd-85dbd8dc522a6dc83d64619d1cdf603ef9461dcc.zip
test_client_put_stop: use TCP_NODELAY for client
-rw-r--r--src/microhttpd/test_client_put_stop.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/microhttpd/test_client_put_stop.c b/src/microhttpd/test_client_put_stop.c
index 7d1c66c0..814e8418 100644
--- a/src/microhttpd/test_client_put_stop.c
+++ b/src/microhttpd/test_client_put_stop.c
@@ -326,6 +326,15 @@ _MHD_dumbClient_create (unsigned int port, const char *method, const char *url,
326 else 326 else
327 make_blocking (clnt->sckt); 327 make_blocking (clnt->sckt);
328 328
329 if (1)
330 { /* Always set TCP NODELAY */
331 const MHD_SCKT_OPT_BOOL_ on_val = 1;
332
333 if (0 != setsockopt (clnt->sckt, IPPROTO_TCP, TCP_NODELAY,
334 (const void *) &on_val, sizeof (on_val)))
335 externalErrorExitDesc ("Cannot set TCP_NODELAY option");
336 }
337
329 clnt->port = port; 338 clnt->port = port;
330 339
331 if (NULL != method) 340 if (NULL != method)