ss_proto.proto

This commit is contained in:
aozhiwei 2019-05-14 17:29:39 +08:00
parent 219c6254a2
commit fef5df535a
8 changed files with 58 additions and 16 deletions

View File

@ -12,9 +12,6 @@ class GGListener : public a8::Singleton<GGListener>
GGListener() {};
friend class a8::Singleton<GGListener>;
public:
enum { HID = HID_GGListener };
public:
void Init();
void UnInit();

View File

@ -15,6 +15,7 @@
#include "app.h"
#include "jsondatamgr.h"
#include "handlermgr.h"
#include "gsmgr.h"
#include "ss_msgid.pb.h"
#include "ss_proto.pb.h"
@ -338,10 +339,8 @@ void App::ProcessGameGateMsg(f8::MsgHdr& hdr)
hdr.msgid);
if (handler) {
switch (handler->handlerid) {
case HID_GGListener:
#if 0
ProcessNetMsg(handler, GGListener::Instance(), hdr);
#endif
case HID_GSMgr:
ProcessNetMsg(handler, GSMgr::Instance(), hdr);
break;
}
}

View File

@ -19,11 +19,7 @@ enum InnerMesssage_e
//网络处理对象
enum NetHandler_e
{
HID_Player,
HID_PlayerMgr,
HID_Room,
HID_RoomMgr,
HID_GGListener,
HID_GSMgr,
};
enum PlayerState_e

View File

@ -0,0 +1,18 @@
#include "precompile.h"
#include "gsmgr.h"
void GSMgr::Init()
{
}
void GSMgr::UnInit()
{
}
void GSMgr::_SS_WSP_RequestTargetServer(f8::MsgHdr& hdr, const ss::SS_WSP_RequestTargetServer& msg)
{
}

View File

@ -0,0 +1,21 @@
#pragma once
#include "ss_proto.pb.h"
class GSMgr : public a8::Singleton<GSMgr>
{
public:
enum { HID = HID_GSMgr };
private:
GSMgr() {};
friend class a8::Singleton<GSMgr>;
public:
void Init();
void UnInit();
void _SS_WSP_RequestTargetServer(f8::MsgHdr& hdr, const ss::SS_WSP_RequestTargetServer& msg);
};

View File

@ -7,6 +7,7 @@
#include "GGListener.h"
#include "app.h"
#include "cs_proto.pb.h"
#include "gsmgr.h"
static void _GMOpsSelfChecking(f8::JsonHttpRequest* request)
{
@ -37,6 +38,7 @@ void HandlerMgr::UnInit()
void HandlerMgr::RegisterNetMsgHandlers()
{
RegisterNetMsgHandler(&ggmsghandler, &GSMgr::_SS_WSP_RequestTargetServer);
}
void HandlerMgr::ProcGMMsg(unsigned long saddr, int sockhandle,

View File

@ -22,9 +22,6 @@ class HandlerMgr : public a8::Singleton<HandlerMgr>
void UnInit();
f8::NetMsgHandlerObject ggmsghandler;
f8::NetMsgHandlerObject dbmsghandler;
f8::NetMsgHandlerObject dpmsghandler;
f8::NetMsgHandlerObject bsmsghandler;
void ProcGMMsg(unsigned long saddr, int sockhandle,
const std::string& url, const std::string& quyerstr);

View File

@ -1,4 +1,16 @@
package ss;
import "cs_proto.proto";
message SS_WSP_RequestTargetServer
{
optional int64 context_id = 1;
optional string account_id = 2;
optional string team_id = 3;
}
message SS_MS_ResponseTargetServer
{
optional int64 context_id = 1;
optional int32 instance_id = 2;
optional string host = 3;
optional int32 port = 4;
}