本文整理汇总了C++中CDPCacheSrvr::Send方法的典型用法代码示例。如果您正苦于以下问题:C++ CDPCacheSrvr::Send方法的具体用法?C++ CDPCacheSrvr::Send怎么用?C++ CDPCacheSrvr::Send使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDPCacheSrvr
的用法示例。
在下文中一共展示了CDPCacheSrvr::Send方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UserMessageHandler
void CDPClient::UserMessageHandler( LPDPMSG_GENERIC lpMsg, DWORD dwMsgSize, DPID idFrom )
{
static size_t nSize = sizeof(DPID);
#ifdef __CRASH_0404
CCrashStatus::GetInstance()->SetLastPacket( this, 0xEEEEEEEE );
#endif // __CRASH_0404
LPBYTE lpBuf = (LPBYTE)lpMsg + nSize;
ULONG uBufSize = dwMsgSize - nSize;
DPID dpidUser = *(UNALIGNED LPDPID)lpMsg;
CAr ar( lpBuf, uBufSize );
GETTYPE( ar );
void ( theClass::*pfn )( theParameters ) = GetHandler( dw );
#ifdef __CRASH_0404
CCrashStatus::GetInstance()->SetLastPacket( this, dw );
#endif // __CRASH_0404
if( pfn )
( this->*( pfn ) )( ar, dpidUser, lpMsg, dwMsgSize );
else
g_DPCacheSrvr.Send( lpBuf, uBufSize, dpidUser );
#ifdef __CRASH_0404
CCrashStatus::GetInstance()->SetLastPacket( this, 0xFFFFFFFF );
#endif // __CRASH_0404
}
示例2: UserMessageHandler
void CDPCoreClient::UserMessageHandler( LPDPMSG_GENERIC lpMsg, DWORD dwMsgSize, DPID idFrom )
{
static size_t nSize = sizeof(DPID);
#ifdef __CRASH_0404
CCrashStatus::GetInstance()->SetLastPacket( this, 0xEEEEEEEE );
#endif // __CRASH_0404
LPBYTE lpBuf = (LPBYTE)lpMsg + nSize;
ULONG uBufSize = dwMsgSize - nSize;
DPID dpidUser = *(UNALIGNED LPDPID)lpMsg;
CAr ar( lpBuf, uBufSize );
GETTYPE( ar );
#ifdef __CRASH_0404
CCrashStatus::GetInstance()->SetLastPacket( this, dw );
#endif // __CRASH_0404
void ( theClass::*pfn )( theParameters ) = GetHandler( dw );
if( pfn )
( this->*( pfn ) )( ar, dpidUser );
else
{
switch( dw )
{
case PACKETTYPE_SUMMONPLAYER:
case PACKETTYPE_TELEPORTPLAYER:
case PACKETTYPE_MODIFYMODE:
case PACKETTYPE_BUYING_INFO:
{
CMclAutoLock Lock( CPlayerMng::Instance()->m_AddRemoveLock );
g_DPClientArray.SendToServer( dpidUser, lpMsg, dwMsgSize );
break;
}
default:
g_DPCacheSrvr.Send( lpBuf, uBufSize, dpidUser );
break;
}
}
#ifdef __CRASH_0404
CCrashStatus::GetInstance()->SetLastPacket( this, 0xFFFFFFFF );
#endif // __CRASH_0404
}