int LoadModuleData(CServerObject* pServerObject) { g_pServerObject = pServerObject; OUR_DEBUG((LM_INFO, "[Base LoadModuleData] Begin.\n")); if(g_pServerObject != NULL) { g_BaseCommand.SetServerObject(pServerObject); } else { OUR_DEBUG((LM_INFO, "[Base LoadModuleData] pServerObject is NULL.\n")); } IMessageManager* pMessageManager = g_pServerObject->GetMessageManager(); if(NULL != pMessageManager) { pMessageManager->AddClientCommand(COMMAND_BASE, &g_BaseCommand, g_szName); pMessageManager->AddClientCommand(CLIENT_LINK_CONNECT, &g_BaseCommand, g_szName); pMessageManager->AddClientCommand(CLIENT_LINK_CDISCONNET, &g_BaseCommand, g_szName); } else { OUR_DEBUG((LM_INFO, "[Base LoadModuleData] pMessageManager = NULL.\n")); } OUR_DEBUG((LM_INFO, "[Base LoadModuleData] End.\n")); return 0; }
int LoadModuleData(CServerObject* pServerObject) { g_pServerObject = pServerObject; OUR_DEBUG((LM_INFO, "[Base LoadModuleData] Begin.\n")); if(g_pServerObject != NULL) { g_BaseCommand.SetServerObject(pServerObject); } else { OUR_DEBUG((LM_INFO, "[Base LoadModuleData] pServerObject is NULL.\n")); } IMessageManager* pMessageManager = g_pServerObject->GetMessageManager(); if(NULL != pMessageManager) { pMessageManager->AddClientCommand(COMMAND_BASE, &g_BaseCommand, g_szName); pMessageManager->AddClientCommand(CLIENT_LINK_CONNECT, &g_BaseCommand, g_szName); pMessageManager->AddClientCommand(CLIENT_LINK_CDISCONNET, &g_BaseCommand, g_szName); pMessageManager->AddClientCommand(CLINET_LINK_SENDTIMEOUT, &g_BaseCommand, g_szName); } else { OUR_DEBUG((LM_INFO, "[Base LoadModuleData] pMessageManager = NULL.\n")); } //显示框架工作线程ID OUR_DEBUG((LM_INFO, "[Base LoadModuleData] *********************************.\n")); uint32 u4WorkThread = pMessageManager->GetWorkThreadCount(); OUR_DEBUG((LM_INFO, "[Base LoadModuleData] WorkThreadCount=%d.\n", u4WorkThread)); for(uint32 u4Index = 0; u4Index < u4WorkThread; u4Index++) { OUR_DEBUG((LM_INFO, "[Base LoadModuleData] WorkThreadID=%d.\n", pMessageManager->GetWorkThreadByIndex(u4Index))); } OUR_DEBUG((LM_INFO, "[Base LoadModuleData] *********************************.\n")); g_BaseCommand.ReadIniFile(pServerObject->GetModuleInfo()->GetModuleParam(g_szName)); OUR_DEBUG((LM_INFO, "[Base LoadModuleData] End.\n")); return 0; }
int LoadModuleData(CServerObject* pServerObject) { g_pServerObject = pServerObject; OUR_DEBUG((LM_INFO, "[Base LoadModuleData] Begin.\n")); if(g_pServerObject != NULL) { g_BaseCommand.SetServerObject(pServerObject); } else { OUR_DEBUG((LM_INFO, "[Base LoadModuleData] pServerObject is NULL.\n")); } IMessageManager* pMessageManager = g_pServerObject->GetMessageManager(); if(NULL != pMessageManager) { pMessageManager->AddClientCommand(COMMAND_ENTERROOM, &g_BaseCommand, g_szName); pMessageManager->AddClientCommand(COMMAND_EXITROOM, &g_BaseCommand, g_szName); pMessageManager->AddClientCommand(COMMAND_BEGINROOM, &g_BaseCommand, g_szName); pMessageManager->AddClientCommand(COMMAND_ENDROOM, &g_BaseCommand, g_szName); pMessageManager->AddClientCommand(COMMAND_SETCARDROOM, &g_BaseCommand, g_szName); pMessageManager->AddClientCommand(COMMAND_OUTOLAYER, &g_BaseCommand, g_szName); pMessageManager->AddClientCommand(COMMAND_CHANGEROOM, &g_BaseCommand, g_szName); pMessageManager->AddClientCommand(COMMAND_CLEARROOM, &g_BaseCommand, g_szName); pMessageManager->AddClientCommand(COMMAND_INITROOM, &g_BaseCommand, g_szName); pMessageManager->AddClientCommand(COMMAND_SETROOM, &g_BaseCommand, g_szName); } else { OUR_DEBUG((LM_INFO, "[Base LoadModuleData] pMessageManager = NULL.\n")); } OUR_DEBUG((LM_INFO, "[Base LoadModuleData] End.\n")); //运行Command初始化 g_BaseCommand.Init(pServerObject->GetTimerManager()); return 0; }