mirror of https://github.com/libAthena/athena.git
Add WSA initializer to handle winderp
This commit is contained in:
parent
7c4d0bb6fd
commit
a411b1084c
|
@ -49,5 +49,23 @@ void Socket::setBlocking(bool blocking)
|
||||||
sock_set_blocking(m_handle, blocking);
|
sock_set_blocking(m_handle, blocking);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if _WIN32
|
||||||
|
struct WSADerpHandler
|
||||||
|
{
|
||||||
|
WSADerpHandler()
|
||||||
|
{
|
||||||
|
WSADATA init;
|
||||||
|
WSAStartup(MAKEWORD(2, 2), &init);
|
||||||
|
}
|
||||||
|
|
||||||
|
~WSADerpHandler()
|
||||||
|
{
|
||||||
|
WSACleanup();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
static const WSADerpHandler __wsaderp__;
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue