Going over the code of inet.cpp, I noticed
```
static WSADATA wsadata;
const WORD version = MAKEWORD(2, 0);
const int wsaError = WSAStartup(version, &wsadata);
```
In other words, we're asking for Winsock 2.0, while, since at least
1996, the version is Winsock 2.2 (would be MAKEWORD(2,2)).
From
https://learn.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-wsastartup:
(emphasis mine)
"""
Windows Sockets version 2.2 is supported on Windows Server 2008, Windows
Vista, Windows Server 2003, Windows XP, Windows 2000, Windows NT 4.0
with Service Pack 4 (SP4) and later, Windows Me, Windows 98, and Windows
95 OSR2. Windows Sockets version 2.2 is also supported on
Windows 95 with the Windows Socket 2 Update. **Applications on these
platforms should normally request Winsock 2.2 by setting the
wVersionRequested parameter accordingly**.
"""
(Apparently, they haven't updated this to mention Windows versions
released after that.)
Going over the 2.2.0 spec (at
https://archive.org/details/Winsock2Spec),
I didn't see anything that would change for us by asking for 2.2, but it
would make sense to me to ask for version 2.2 as recommended by Microsoft.
Also, it shouldn't be necessary for wsadata to be declared static, as it
is just to inform you of the result, and we don't do anything with it later.
Mark
--
Mark Rotteveel