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>
40 lines
1.0 KiB
C++
40 lines
1.0 KiB
C++
#include "stdafx.h"
|
|
#include "DBAgentRequest.h"
|
|
#include "DBAgentDispatch.h"
|
|
#include "../GameClient/GameClientDispatch.h"
|
|
|
|
#include <Network/Session/Session.h>
|
|
#include <Network/Dispatch/ServerRequest.h>
|
|
|
|
|
|
CDBRequest::CDBRequest(CGameClientDispatch& GameClientDispatch,
|
|
unsigned long dwDurationSec, TimeoutRequest lpTimeoutRequest)
|
|
: m_dwRequestKey(0),
|
|
m_lpDBAgentSendStream(0)
|
|
{
|
|
GET_SINGLE_DISPATCH(lpDBAgentDispatch,
|
|
CDBAgentDispatch, CDBAgentDispatch::GetDispatchTable());
|
|
|
|
if(0 != lpDBAgentDispatch)
|
|
{
|
|
m_lpDBAgentSendStream = &lpDBAgentDispatch->GetSendStream();
|
|
if(0 != m_lpDBAgentSendStream)
|
|
{
|
|
m_dwRequestKey = CServerRequest::GetInstance().AddRequest(&GameClientDispatch,
|
|
lpDBAgentDispatch, dwDurationSec, lpTimeoutRequest);
|
|
|
|
if(0 == m_dwRequestKey)
|
|
{
|
|
m_lpDBAgentSendStream = 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
void CDBRequest::CancelRequest()
|
|
{
|
|
if(0 != m_dwRequestKey)
|
|
{
|
|
CServerRequest::GetInstance().RemoveRequest(m_dwRequestKey);
|
|
}
|
|
} |