ss_proto.proto
This commit is contained in:
parent
219c6254a2
commit
fef5df535a
@ -12,9 +12,6 @@ class GGListener : public a8::Singleton<GGListener>
|
|||||||
GGListener() {};
|
GGListener() {};
|
||||||
friend class a8::Singleton<GGListener>;
|
friend class a8::Singleton<GGListener>;
|
||||||
|
|
||||||
public:
|
|
||||||
enum { HID = HID_GGListener };
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void Init();
|
void Init();
|
||||||
void UnInit();
|
void UnInit();
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include "app.h"
|
#include "app.h"
|
||||||
#include "jsondatamgr.h"
|
#include "jsondatamgr.h"
|
||||||
#include "handlermgr.h"
|
#include "handlermgr.h"
|
||||||
|
#include "gsmgr.h"
|
||||||
|
|
||||||
#include "ss_msgid.pb.h"
|
#include "ss_msgid.pb.h"
|
||||||
#include "ss_proto.pb.h"
|
#include "ss_proto.pb.h"
|
||||||
@ -338,10 +339,8 @@ void App::ProcessGameGateMsg(f8::MsgHdr& hdr)
|
|||||||
hdr.msgid);
|
hdr.msgid);
|
||||||
if (handler) {
|
if (handler) {
|
||||||
switch (handler->handlerid) {
|
switch (handler->handlerid) {
|
||||||
case HID_GGListener:
|
case HID_GSMgr:
|
||||||
#if 0
|
ProcessNetMsg(handler, GSMgr::Instance(), hdr);
|
||||||
ProcessNetMsg(handler, GGListener::Instance(), hdr);
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,11 +19,7 @@ enum InnerMesssage_e
|
|||||||
//网络处理对象
|
//网络处理对象
|
||||||
enum NetHandler_e
|
enum NetHandler_e
|
||||||
{
|
{
|
||||||
HID_Player,
|
HID_GSMgr,
|
||||||
HID_PlayerMgr,
|
|
||||||
HID_Room,
|
|
||||||
HID_RoomMgr,
|
|
||||||
HID_GGListener,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum PlayerState_e
|
enum PlayerState_e
|
||||||
|
18
server/masterserver/gsmgr.cc
Normal file
18
server/masterserver/gsmgr.cc
Normal 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)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
21
server/masterserver/gsmgr.h
Normal file
21
server/masterserver/gsmgr.h
Normal 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);
|
||||||
|
|
||||||
|
};
|
@ -7,6 +7,7 @@
|
|||||||
#include "GGListener.h"
|
#include "GGListener.h"
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
#include "cs_proto.pb.h"
|
#include "cs_proto.pb.h"
|
||||||
|
#include "gsmgr.h"
|
||||||
|
|
||||||
static void _GMOpsSelfChecking(f8::JsonHttpRequest* request)
|
static void _GMOpsSelfChecking(f8::JsonHttpRequest* request)
|
||||||
{
|
{
|
||||||
@ -37,6 +38,7 @@ void HandlerMgr::UnInit()
|
|||||||
|
|
||||||
void HandlerMgr::RegisterNetMsgHandlers()
|
void HandlerMgr::RegisterNetMsgHandlers()
|
||||||
{
|
{
|
||||||
|
RegisterNetMsgHandler(&ggmsghandler, &GSMgr::_SS_WSP_RequestTargetServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandlerMgr::ProcGMMsg(unsigned long saddr, int sockhandle,
|
void HandlerMgr::ProcGMMsg(unsigned long saddr, int sockhandle,
|
||||||
|
@ -22,9 +22,6 @@ class HandlerMgr : public a8::Singleton<HandlerMgr>
|
|||||||
void UnInit();
|
void UnInit();
|
||||||
|
|
||||||
f8::NetMsgHandlerObject ggmsghandler;
|
f8::NetMsgHandlerObject ggmsghandler;
|
||||||
f8::NetMsgHandlerObject dbmsghandler;
|
|
||||||
f8::NetMsgHandlerObject dpmsghandler;
|
|
||||||
f8::NetMsgHandlerObject bsmsghandler;
|
|
||||||
|
|
||||||
void ProcGMMsg(unsigned long saddr, int sockhandle,
|
void ProcGMMsg(unsigned long saddr, int sockhandle,
|
||||||
const std::string& url, const std::string& quyerstr);
|
const std::string& url, const std::string& quyerstr);
|
||||||
|
@ -1,4 +1,16 @@
|
|||||||
package ss;
|
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;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user