diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-11-23 17:50:15 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-11-24 19:07:34 +0300 |
commit | 85dbd8dc522a6dc83d64619d1cdf603ef9461dcc (patch) | |
tree | 4dab193ba3c26c8061a0a18e71e38e51185b0b08 | |
parent | 52b7989822e20d4a33151b46acd765d532b06338 (diff) | |
download | libmicrohttpd-85dbd8dc522a6dc83d64619d1cdf603ef9461dcc.tar.gz libmicrohttpd-85dbd8dc522a6dc83d64619d1cdf603ef9461dcc.zip |
test_client_put_stop: use TCP_NODELAY for client
-rw-r--r-- | src/microhttpd/test_client_put_stop.c | 9 |
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) |