일단 거의 모든 버그 다 고칢..
This commit is contained in:
@@ -1,24 +1,15 @@
|
||||
#include "Socket/IOCP.hpp"
|
||||
#include "Socket/WSAManager.hpp"
|
||||
#include "Socket/Log.hpp"
|
||||
#include "Utils/ThreadPool.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;
|
||||
void IOCP::registerSocket(SOCKET sock) {
|
||||
#ifdef _WIN32
|
||||
struct Chattr::WSAManager wsaManager;
|
||||
completinPort_ = ::CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0);
|
||||
if (completinPort_ == NULL)
|
||||
log::critical("CreateIoCompletionPort()");
|
||||
HANDLE returnData = ::CreateIoCompletionPort((HANDLE)sock, completionPort_, sock, 0);
|
||||
if (returnData == 0)
|
||||
completionPort_ = returnData;
|
||||
#elif __linux__
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user