本文整理汇总了C++中UserSession::GetUserPacket方法的典型用法代码示例。如果您正苦于以下问题:C++ UserSession::GetUserPacket方法的具体用法?C++ UserSession::GetUserPacket怎么用?C++ UserSession::GetUserPacket使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserSession
的用法示例。
在下文中一共展示了UserSession::GetUserPacket方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MSG_Handler_Reminder_REQ
/*****************************************************
MSG_Handler_CalledBank_REQ
*****************************************************/
void MSG_Handler_Reminder_REQ ( ServerSession * pServerSession, MSG_BASE * pMsg, WORD wSize )
{
UserSession * pSession = ( UserSession * ) pServerSession;
{
UserPacket & user = pSession->GetUserPacket();
user.GetProtocol() = MAKEDWORD( Games_Protocol, Reminder_REQ );
user.ToPrint();
g_AgentServer->SendToGameServer( (BYTE*)&user, user.GetPacketSize() );
}
}
示例2: FromClientToAgent_StartGame_REQ
/************************************************
FromClientToAgent_StartGame_REQ
************************************************/
void FromClientToAgent_StartGame_REQ ( ServerSession * pServerSession, MSG_BASE * pMsg, WORD wSize ) {
UserSession * pSession = ( UserSession * ) pServerSession;
{
UserPacket pack = pSession->GetUserPacket();
pack.GetProtocol() = MAKEDWORD( Games_Protocol, StartGame_REQ );
pack.GetReady() = 1;
pack.ToPrint();
g_AgentServer->SendToGameServer( (BYTE*)&pack, pack.GetPacketSize() );
}
}
示例3: MSG_Handler_QuitTable_REQ
void MSG_Handler_QuitTable_REQ ( ServerSession * pServerSession, MSG_BASE * pMsg, WORD wSize )
{
DEBUG_MSG( LVL_DEBUG, "QuitTable_REQ to recv: %s \n", (char*) pMsg );
UserSession * pSession = ( UserSession * ) pServerSession;
{
UserPacket & user = pSession->GetUserPacket();
user.GetProtocol() = MAKEDWORD( Games_Protocol, QuitTable_REQ );
user.ToPrint();
g_AgentServer->SendToGameServer( (BYTE*)&user, user.GetPacketSize() );
}
}