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>
45 lines
1.2 KiB
C++
45 lines
1.2 KiB
C++
#ifndef _RYL_SERVER_REQUEST_KEEPER_H_
|
|
#define _RYL_SERVER_REQUEST_KEEPER_H_
|
|
|
|
#include <Thread/Lock.h>
|
|
|
|
class CPacketDispatch;
|
|
|
|
// 서버간 통신시 보낸 패킷 정보를 보관 (현재 의미가 없으나 패킷Ack관리를 해야함)
|
|
class CServerRequestKeeper
|
|
{
|
|
public:
|
|
// Request패킷 기본 구조체
|
|
struct RequestInfo
|
|
{
|
|
unsigned long m_dwClientRequest;
|
|
CPacketDispatch* m_lpPacketDispatch;
|
|
|
|
RequestInfo(unsigned long dwClientRequest, CPacketDispatch* lpPakcetDispatch)
|
|
: m_dwClientRequest(dwClientRequest)
|
|
, m_lpPacketDispatch(lpPakcetDispatch) {}
|
|
|
|
RequestInfo()
|
|
: m_dwClientRequest(0)
|
|
, m_lpPacketDispatch(NULL) {}
|
|
};
|
|
|
|
public:
|
|
CServerRequestKeeper();
|
|
~CServerRequestKeeper();
|
|
|
|
unsigned long Push(CPacketDispatch* lpPacketDispatch, unsigned long dwClientRequest);
|
|
bool Pop(unsigned long dwRequestKey);
|
|
|
|
void RemoveAllSelectDispatch(CPacketDispatch* lpPacketDispatch); // Param으로 들어온 Dispatch인것들은 목록에서 전부 삭제
|
|
bool GetRequest(unsigned long dwRequestKey, RequestInfo& Out_Info); // Request정보 가져오기
|
|
|
|
private:
|
|
typedef std::map<unsigned long, RequestInfo> isMapReqMap;
|
|
|
|
isMapReqMap m_RequestMap;
|
|
unsigned long m_RequestKey;
|
|
CCSLock m_RequestMapLock;
|
|
};
|
|
|
|
#endif |