Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
#include "stdafx.h"
|
||||
#include "CompletionHandler.h"
|
||||
|
||||
CCompletionHandler::CCompletionHandler()
|
||||
: m_hIOCP(INVALID_HANDLE_VALUE), m_nThread(0), m_nTimeOutMS(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
CCompletionHandler::~CCompletionHandler()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
||||
bool CCompletionHandler::Initialize(unsigned long nThread, unsigned long nTimeOutMS)
|
||||
{
|
||||
if(INVALID_HANDLE_VALUE != m_hIOCP)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
m_hIOCP = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, NULL, nThread);
|
||||
if(0 == m_hIOCP)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
m_nThread = nThread;
|
||||
m_nTimeOutMS = nTimeOutMS;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool CCompletionHandler::Destroy()
|
||||
{
|
||||
if(INVALID_HANDLE_VALUE != m_hIOCP)
|
||||
{
|
||||
if(!CloseHandle(m_hIOCP))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
m_hIOCP = INVALID_HANDLE_VALUE;
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user