Loading src/socket.h +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ namespace netplus { void *_Extension; static std::atomic<int> _InitCount; #ifdef Windows WSAData *_WSAData; WSAData _WSAData; #endif // Windows }; Loading src/windows/socket.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ netplus::socket::socket(){ _SocketPtr=nullptr; _Type=-1; if (_InitCount<1) { if (WSAStartup(MAKEWORD(2, 2), _WSAData) != 0) { if (WSAStartup(MAKEWORD(2, 2), &_WSAData) != 0) { NetException exception; exception[NetException::Critical] << "socket: WSAStartup failed: "; } Loading @@ -66,8 +66,6 @@ netplus::socket::~socket(){ int zero = 0; if (_InitCount.compare_exchange_strong(zero, std::memory_order_release)) { WSACleanup(); delete _WSAData; _WSAData = nullptr; } } Loading Loading
src/socket.h +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ namespace netplus { void *_Extension; static std::atomic<int> _InitCount; #ifdef Windows WSAData *_WSAData; WSAData _WSAData; #endif // Windows }; Loading
src/windows/socket.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ netplus::socket::socket(){ _SocketPtr=nullptr; _Type=-1; if (_InitCount<1) { if (WSAStartup(MAKEWORD(2, 2), _WSAData) != 0) { if (WSAStartup(MAKEWORD(2, 2), &_WSAData) != 0) { NetException exception; exception[NetException::Critical] << "socket: WSAStartup failed: "; } Loading @@ -66,8 +66,6 @@ netplus::socket::~socket(){ int zero = 0; if (_InitCount.compare_exchange_strong(zero, std::memory_order_release)) { WSACleanup(); delete _WSAData; _WSAData = nullptr; } } Loading