Files
Np_Term/impl/socket/wsa_manager.cpp
2025-05-31 03:19:58 +09:00

21 lines
305 B
C++

#include "socket/wsa_manager.h"
namespace Network {
WSAManager::WSAManager() {
#ifdef _WIN32
WSADATA wsa;
if (WSAStartup(MAKEWORD(2, 2), &wsa) != 0) {
spdlog::critical("WSAStartup()");
std::exit(EXIT_FAILURE);
}
#endif
}
WSAManager::~WSAManager() {
#ifdef _WIN32
WSACleanup();
#endif
}
}