本文整理汇总了C++中CDPDatabaseClient::ReceiveMessage方法的典型用法代码示例。如果您正苦于以下问题:C++ CDPDatabaseClient::ReceiveMessage方法的具体用法?C++ CDPDatabaseClient::ReceiveMessage怎么用?C++ CDPDatabaseClient::ReceiveMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDPDatabaseClient
的用法示例。
在下文中一共展示了CDPDatabaseClient::ReceiveMessage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Run
void CRunObject::Run( void )
{
HANDLE hHeartbeat;
if( !( hHeartbeat = CreateEvent( NULL, FALSE, FALSE, g_sHeartbeat ) ) )
hHeartbeat = OpenEvent( EVENT_MODIFY_STATE, FALSE, g_sHeartbeat );
if( NULL == hHeartbeat )
Error( "MAPI_E_NOT_ENOUGH_RESOURCES" );
DWORD dwTickHearbeat = timeGetTime() + SEC( 2 );
CTimeout timeoutObject( 67, 0 );
CTimeout timeoutReadAgent( 67, 20 );
CTimeout timeoutReadCore( 67, 40 );
CTimeout timeoutReadTrans( 67, 50 );
CTimeout timeoutReadAccount( 67, 60 );
CTimeout timeoutRespawn( 1000, 200 );
CTimeout timeout( 1000, 600 );
#ifdef __EVENT_1101
CTimeout timeoutCallTheRoll( MIN( 1 ), 70 );
#endif // __EVENT_1101
DWORD dwCur, dwOld;
while( WaitForSingleObject( m_hClose, 1 ) != WAIT_OBJECT_0 )
{
{
_PROFILE( "CRunObject::Run()" );
g_tmCurrent = timeGetTime();
g_tCurrent = time( NULL );
dwCur = g_tmCurrent;
dwOld = dwCur;
if( timeoutObject.TimeoutReset( g_tmCurrent ) )
{
_PROFILE( "CWorldMng::Process()" );
g_WorldMng.Process();
if( g_tmCurrent > dwTickHearbeat )
{
SetEvent( hHeartbeat );
dwTickHearbeat = g_tmCurrent + SEC( 2 );
}
}
PROFILE_RUN( r1 );
if( timeoutReadAgent.TimeoutReset( g_tmCurrent ) )
{
_PROFILE( "g_DPSrvr.ReceiveMessage()" );
g_DPSrvr.ReceiveMessage();
}
PROFILE_RUN( r2 );
if( timeoutReadCore.TimeoutReset( g_tmCurrent ) )
{
_PROFILE( "g_DPCoreClient.ReceiveMessage()" );
g_DPCoreClient.ReceiveMessage();
}
PROFILE_RUN( r3 );
if( timeoutReadTrans.TimeoutReset( g_tmCurrent ) )
{
_PROFILE( "g_dpDBClient.ReceiveMessage()" );
g_dpDBClient.ReceiveMessage();
}
PROFILE_RUN( r4 );
/*
#ifdef __GIFTBOX0213
if( timeoutReadAccount.TimeoutReset( g_tmCurrent ) )
CDPAccountClient::GetInstance()->ReceiveMessage();
#endif // __GIFTBOX0213
*/
#ifdef __EVENTLUA_KEEPCONNECT
if( timeoutReadAccount.TimeoutReset( g_tmCurrent ) )
prj.m_EventLua.KeepConnectEventProcess();
#endif // __EVENTLUA_KEEPCONNECT
PROFILE_RUN( r5 );
if( timeoutRespawn.TimeoutReset( g_tmCurrent ) )
{
_PROFILE( "g_WorldMng.Respawn()" );
u_long uRespawned = g_WorldMng.Respawn();
// if( uRespawned > 0 )
SetLogInfo( LOGTYPE_RESPAWN, "Respawn:%d Object:%d", uRespawned, g_WorldMng.GetObjCount() );
}
PROFILE_RUN( r6 );
if( timeout.TimeoutReset( g_tmCurrent ) )
{
_PROFILE( "1SEC_Process" );
g_GameTimer.Compute();
CGuildQuestProcessor::GetInstance()->Process();
CPartyQuestProcessor::GetInstance()->Process();
PROFILE_RUN( r7 );
//.........这里部分代码省略.........