summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/TaskMan.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/TaskMan.cc b/src/TaskMan.cc
index ea9c0fb..3b715ce 100644
--- a/src/TaskMan.cc
+++ b/src/TaskMan.cc
@@ -16,6 +16,20 @@ Balau::TaskMan::TaskMan() : m_stopped(false) {
}
}
+#ifdef _WIN32
+class WinSocketStartup : public Balau::AtStart {
+ public:
+ WinSocketStartup() : AtStart(5) { }
+ virtual void doStart() {
+ WSADATA wsaData;
+ int r = WSAStartup(MAKEWORD(2, 0), &wsaData);
+ Assert(r == 0);
+ }
+};
+
+static WinSocketStartup wsa;
+#endif
+
Balau::TaskMan * Balau::TaskMan::getTaskMan() { return localTaskMan.get(); }
Balau::TaskMan::~TaskMan() {