1
This commit is contained in:
parent
9a13342b50
commit
cfdc4f4f63
@ -11,8 +11,6 @@
|
||||
#include <a8/uuid.h>
|
||||
#include <a8/ioloop.h>
|
||||
|
||||
#include "framework/cpp/netmsghandler.h"
|
||||
|
||||
#include "app.h"
|
||||
#include "IMListener.h"
|
||||
#include "WSListener.h"
|
||||
@ -28,6 +26,9 @@
|
||||
#include "MSConnMgr.h"
|
||||
#include "IMConnMgr.h"
|
||||
|
||||
#include "framework/cpp/msgqueue.h"
|
||||
#include "framework/cpp/netmsghandler.h"
|
||||
|
||||
struct MsgNode
|
||||
{
|
||||
SocketFrom_e sockfrom;
|
||||
@ -81,6 +82,7 @@ bool App::Init(int argc, char* argv[])
|
||||
InitLog();
|
||||
HandlerMgr::Instance()->Init();
|
||||
a8::Timer::Instance()->Init();
|
||||
f8::MsgQueue::Instance()->Init();
|
||||
a8::IoLoop::Instance()->Init(1);
|
||||
JsonDataMgr::Instance()->Init();
|
||||
uuid.SetMachineId(instance_id);
|
||||
@ -134,6 +136,7 @@ void App::UnInit()
|
||||
MSConnMgr::Instance()->UnInit();
|
||||
JsonDataMgr::Instance()->UnInit();
|
||||
a8::IoLoop::Instance()->UnInit();
|
||||
f8::MsgQueue::Instance()->UnInit();
|
||||
a8::Timer::Instance()->UnInit();
|
||||
HandlerMgr::Instance()->UnInit();
|
||||
UnInitLog();
|
||||
@ -454,6 +457,15 @@ void App::ProcessIMMsg()
|
||||
while (im_work_node_) {
|
||||
IMMsgNode *pdelnode = im_work_node_;
|
||||
switch (im_work_node_->msgid) {
|
||||
case f8::IM_SysMsgQueue:
|
||||
{
|
||||
const a8::XParams* param = (const a8::XParams*)pdelnode->params.param1.GetUserData();
|
||||
f8::MsgQueue::Instance()->ProcessMsg(pdelnode->params.sender.GetInt(),
|
||||
*param
|
||||
);
|
||||
delete param;
|
||||
}
|
||||
break;
|
||||
case IM_WSProxyDisconnect:
|
||||
{
|
||||
PlayerMgr::Instance()->OnWSProxyDisconnect(pdelnode->params);
|
||||
|
@ -9,27 +9,29 @@ void JsonDataMgr::Init()
|
||||
{
|
||||
if (!f8::IsOnlineEnv()) {
|
||||
if (f8::IsTestEnv()) {
|
||||
work_path_ = a8::Format("/root/pub/%d/%d/conf_test/friend/imserver.test",
|
||||
work_path_ = a8::Format("/root/pub/%d/%d/conf_test/game%d/imserver.test",
|
||||
{
|
||||
GAME_ID,
|
||||
App::Instance()->instance_id,
|
||||
GAME_ID
|
||||
});
|
||||
} else {
|
||||
work_path_ = a8::Format("/root/pub/%d/%d/conf_test/friend/imserver.dev",
|
||||
work_path_ = a8::Format("/root/pub/%d/%d/conf_test/game%d/imserver.dev",
|
||||
{
|
||||
GAME_ID,
|
||||
App::Instance()->instance_id,
|
||||
GAME_ID
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
std::string imserver_cluster_json_file;
|
||||
std::string masterserver_cluster_json_file;
|
||||
imserver_cluster_json_file = a8::Format("%s/friend.imserver.cluster.json",
|
||||
imserver_cluster_json_file = a8::Format("%s/node1/friend.imserver.cluster.json",
|
||||
{
|
||||
work_path_,
|
||||
});
|
||||
masterserver_cluster_json_file = a8::Format("%s/friend.masterserver.cluster.json",
|
||||
masterserver_cluster_json_file = a8::Format("%s/node1/friend.masterserver.cluster.json",
|
||||
{
|
||||
work_path_,
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user