From: nishi Date: Mon, 5 Feb 2024 02:53:24 +0000 (+0000) Subject: winsock is slow X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=214733a391d5efcd9da11d9fe1fb2104550e5f5e;p=libw3.git winsock is slow git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@165 d27a3e52-49c5-7645-884c-6793ebffc270 --- diff --git a/Library/DNS.c b/Library/DNS.c index 4efabfb..62eb794 100644 --- a/Library/DNS.c +++ b/Library/DNS.c @@ -60,6 +60,8 @@ int __W3_DNS_Connect(const char* hostname, bool ssl, uint16_t port if(sock == -1) continue; int nzero = 0; setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char*)&nzero, sizeof(nzero)); + int yes = 1; + setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char*)&yes, sizeof(yes)); if(connect(sock, rp->ai_addr, rp->ai_addrlen) != -1) break; close(sock); } diff --git a/W3Version.h.p b/W3Version.h.p index 2521604..fd5d7c4 100644 --- a/W3Version.h.p +++ b/W3Version.h.p @@ -6,7 +6,7 @@ extern "C" { #endif -#define LIBW3_VERSION "2.2K" \ +#define LIBW3_VERSION "2.2L" \ SUFFIX #ifdef __cplusplus