X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnet%2Fwindows%2Fsocket.cpp;h=eadc22af3a2de5355c349d16e201f8d1ec01b032;hb=6057616e00a6792e219fab2ce958306e737faa67;hp=dfcff623c328f4f03b2a7129a1931891a80c140b;hpb=c2eeb0da9f5e5de1b8de1bc66a42709e54d504e2;p=libs%2Fnet.git diff --git a/source/net/windows/socket.cpp b/source/net/windows/socket.cpp index dfcff62..eadc22a 100644 --- a/source/net/windows/socket.cpp +++ b/source/net/windows/socket.cpp @@ -1,9 +1,9 @@ -#include #include "platform_api.h" +#include "socket.h" +#include #include #include #include "sockaddr_private.h" -#include "socket.h" #include "socket_private.h" using namespace std; @@ -27,7 +27,7 @@ public: } }; -WinSockHelper wsh; +unique_ptr wsh; } @@ -37,6 +37,8 @@ namespace Net { void Socket::platform_init() { + if(!wsh) + wsh = make_unique(); *priv->event = CreateEvent(0, false, false, 0); }