summaryrefslogtreecommitdiff
path: root/src/socketengines
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-12-08 22:27:45 +0000
committerPeter Powell <petpow@saberuk.com>2019-12-08 22:27:45 +0000
commit078f72c1abbd51aaac3ddc32cb79b08bfc6e43c2 (patch)
tree0d7034f664dc006802165fed2f77328c5edcd399 /src/socketengines
parent98561bddd06d118e5043094bc884593049f37315 (diff)
Initialise Winsock from inside the socket engine.
Diffstat (limited to 'src/socketengines')
-rw-r--r--src/socketengines/socketengine_select.cpp6
1 files changed, 6 insertions, 0 deletions
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);