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:
61
Server/RylServerProject/BaseLibrary/Network/Iocp/IOCPNet.h
Normal file
61
Server/RylServerProject/BaseLibrary/Network/Iocp/IOCPNet.h
Normal file
@@ -0,0 +1,61 @@
|
||||
#ifndef _CIOCPMGR_H_
|
||||
#define _CIOCPMGR_H_
|
||||
|
||||
#include <map>
|
||||
#include <list>
|
||||
#include "../../Thread/Lock.h"
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
class CListener;
|
||||
class CSession;
|
||||
class CSessionPolicy;
|
||||
class CCompletionHandler;
|
||||
class CThreadMgr;
|
||||
class CSessionMgr;
|
||||
class CValidateConnection;
|
||||
|
||||
class CIOCPNet
|
||||
{
|
||||
public:
|
||||
|
||||
CIOCPNet();
|
||||
~CIOCPNet();
|
||||
|
||||
bool Initialize();
|
||||
bool Destroy();
|
||||
|
||||
bool AddListener(CSessionPolicy* lpSessionPolicy,
|
||||
const char* lpListenAddress, unsigned short usPort,
|
||||
unsigned long dwMaxListenPeding = 10,
|
||||
CValidateConnection* lpValidateConnection = 0);
|
||||
|
||||
bool Connect(CSessionPolicy* lpSessionPolicy,
|
||||
const char* lpConnectAddress, unsigned short usPort);
|
||||
|
||||
void Process();
|
||||
|
||||
unsigned long GetAcceptPendingNum();
|
||||
unsigned long GetSessionNum();
|
||||
|
||||
private:
|
||||
|
||||
void DestroyListener();
|
||||
|
||||
typedef std::list<CListener*> ListenerList;
|
||||
typedef std::map<CSessionPolicy*, unsigned int> SessionPolicyMap;
|
||||
|
||||
typedef CCSLock SessionLock;
|
||||
|
||||
SessionLock m_IOCPLock;
|
||||
CACHE_PAD(SessionLockPad, sizeof(SessionLock));
|
||||
|
||||
CCompletionHandler* m_lpSocketHandler;
|
||||
CThreadMgr* m_lpThreadMgr;
|
||||
CSessionMgr* m_lpSessionMgr;
|
||||
|
||||
ListenerList m_ListenerList;
|
||||
SessionPolicyMap m_SessionPolicyMap;
|
||||
unsigned long m_dwFlags;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user