]> Nishi Git Mirror - libw3.git/commitdiff
winsock is slow
authornishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Mon, 5 Feb 2024 02:53:24 +0000 (02:53 +0000)
committernishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Mon, 5 Feb 2024 02:53:24 +0000 (02:53 +0000)
git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@165 d27a3e52-49c5-7645-884c-6793ebffc270

Library/DNS.c
W3Version.h.p

index 4efabfbc0092f86337213d7ffc5a8edb168750f6..62eb794649d4998f59ddb059c109b472e1b089e8 100644 (file)
@@ -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);
        }
index 2521604547a60ac461d3011f393716623081fde5..fd5d7c4d62d156f6fa1f5281c0fae8e009bf28ba 100644 (file)
@@ -6,7 +6,7 @@
 extern "C" {
 #endif
 
-#define LIBW3_VERSION "2.2K" \
+#define LIBW3_VERSION "2.2L" \
 SUFFIX
 
 #ifdef __cplusplus