tcp/udp 추가, todo:iocp openssl 지원하도록 업데이트하기
This commit is contained in:
20
impl/socket/wsa_manager.cpp
Normal file
20
impl/socket/wsa_manager.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "socket/wsa_manager.h"
|
||||
|
||||
namespace Socket {
|
||||
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
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user