libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 85dbd8dc522a6dc83d64619d1cdf603ef9461dcc
parent 52b7989822e20d4a33151b46acd765d532b06338
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Tue, 23 Nov 2021 17:50:15 +0300

test_client_put_stop: use TCP_NODELAY for client

Diffstat:
Msrc/microhttpd/test_client_put_stop.c | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git 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, else make_blocking (clnt->sckt); + if (1) + { /* Always set TCP NODELAY */ + const MHD_SCKT_OPT_BOOL_ on_val = 1; + + if (0 != setsockopt (clnt->sckt, IPPROTO_TCP, TCP_NODELAY, + (const void *) &on_val, sizeof (on_val))) + externalErrorExitDesc ("Cannot set TCP_NODELAY option"); + } + clnt->port = port; if (NULL != method)