27 lines
550 B
C++
27 lines
550 B
C++
#include "Socket/IOCP.hpp"
|
|
#include "Socket/WSAManager.hpp"
|
|
#include "Socket/Log.hpp"
|
|
#include "precomp.hpp"
|
|
|
|
namespace Chattr {
|
|
|
|
IOCP::IOCP(std::shared_ptr<ThreadPool> __IOCPThread) {
|
|
init(__IOCPThread);
|
|
}
|
|
|
|
IOCP::~IOCP() {
|
|
}
|
|
|
|
void IOCP::init(std::shared_ptr<ThreadPool> __IOCPThread) {
|
|
IOCPThread_ = __IOCPThread;
|
|
#ifdef _WIN32
|
|
struct Chattr::WSAManager wsaManager;
|
|
completinPort_ = ::CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0);
|
|
if (completinPort_ == NULL)
|
|
log::critical("CreateIoCompletionPort()");
|
|
#elif __linux__
|
|
|
|
#endif
|
|
}
|
|
|
|
} |