From 214733a391d5efcd9da11d9fe1fb2104550e5f5e Mon Sep 17 00:00:00 2001 From: nishi Date: Mon, 5 Feb 2024 02:53:24 +0000 Subject: [PATCH] winsock is slow git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@165 d27a3e52-49c5-7645-884c-6793ebffc270 --- Library/DNS.c | 2 ++ W3Version.h.p | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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 -- 2.43.0