mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Move windows socket init to utility function
This commit is contained in:
parent
4be0b082b9
commit
26c9b83677
4 changed files with 21 additions and 9 deletions
12
src/util.cpp
12
src/util.cpp
|
|
@ -794,6 +794,18 @@ void SetupEnvironment()
|
|||
boost::filesystem::path::imbue(loc);
|
||||
}
|
||||
|
||||
bool SetupNetworking()
|
||||
{
|
||||
#ifdef WIN32
|
||||
// Initialize Windows Sockets
|
||||
WSADATA wsadata;
|
||||
int ret = WSAStartup(MAKEWORD(2,2), &wsadata);
|
||||
if (ret != NO_ERROR || LOBYTE(wsadata.wVersion ) != 2 || HIBYTE(wsadata.wVersion) != 2)
|
||||
return false;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
void SetThreadPriority(int nPriority)
|
||||
{
|
||||
#ifdef WIN32
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue