From 078f72c1abbd51aaac3ddc32cb79b08bfc6e43c2 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sun, 8 Dec 2019 22:27:45 +0000 Subject: Initialise Winsock from inside the socket engine. --- src/socketengines/socketengine_select.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/socketengines') diff --git a/src/socketengines/socketengine_select.cpp b/src/socketengines/socketengine_select.cpp index 03f0aca62..bfb9ea05c 100644 --- a/src/socketengines/socketengine_select.cpp +++ b/src/socketengines/socketengine_select.cpp @@ -35,6 +35,12 @@ namespace void SocketEngine::Init() { +#ifdef _WIN32 + // Set up winsock. + WSADATA wsadata; + WSAStartup(MAKEWORD(2,2), &wsadata); +#endif + MaxSetSize = FD_SETSIZE; FD_ZERO(&ReadSet); -- cgit v1.2.3