diff --git a/server/masterserver/cachemgr.cc b/server/masterserver/cachemgr.cc index 854e173..691670e 100644 --- a/server/masterserver/cachemgr.cc +++ b/server/masterserver/cachemgr.cc @@ -11,3 +11,23 @@ void CacheMgr::UnInit() { } + +void CacheMgr::_SS_IM_UserOnline(f8::MsgHdr& hdr, const ss::SS_IM_UserOnline& msg) +{ + +} + +void CacheMgr::_SS_IM_UserOffline(f8::MsgHdr& hdr, const ss::SS_IM_UserOffline& msg) +{ + +} + +void CacheMgr::_SS_IM_PullUserList(f8::MsgHdr& hdr, const ss::SS_IM_PullUserList& msg) +{ + +} + +void CacheMgr::_SS_IM_IMServerList(f8::MsgHdr& hdr, const ss::SS_IM_IMServerList& msg) +{ + +} diff --git a/server/masterserver/cachemgr.h b/server/masterserver/cachemgr.h index bf17e12..ac2074d 100644 --- a/server/masterserver/cachemgr.h +++ b/server/masterserver/cachemgr.h @@ -16,6 +16,11 @@ class CacheMgr : public a8::Singleton void Init(); void UnInit(); + void _SS_IM_UserOnline(f8::MsgHdr& hdr, const ss::SS_IM_UserOnline& msg); + void _SS_IM_UserOffline(f8::MsgHdr& hdr, const ss::SS_IM_UserOffline& msg); + void _SS_IM_PullUserList(f8::MsgHdr& hdr, const ss::SS_IM_PullUserList& msg); + void _SS_IM_IMServerList(f8::MsgHdr& hdr, const ss::SS_IM_IMServerList& msg); + private: private: diff --git a/server/masterserver/error_code.h b/server/masterserver/error_code.h deleted file mode 100755 index 35ec63e..0000000 --- a/server/masterserver/error_code.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -/* - 类似http的错误码设计 - 0:成功 - <400: 客户端的错 - >500: 服务器的错 -*/ -enum ErrorCode_e -{ - ERRNO_OK = 0, - -}; diff --git a/server/masterserver/handlermgr.cc b/server/masterserver/handlermgr.cc index 81d6c59..876aaf5 100644 --- a/server/masterserver/handlermgr.cc +++ b/server/masterserver/handlermgr.cc @@ -8,6 +8,7 @@ #include "app.h" #include "svrmgr.h" #include "imsmgr.h" +#include "cachemgr.h" static void _GMOpsSelfChecking(f8::JsonHttpRequest* request) { @@ -47,6 +48,10 @@ void HandlerMgr::RegisterNetMsgHandlers() RegisterNetMsgHandler(&ggmsghandler, &GGListener::_SS_Ping); RegisterNetMsgHandler(&immsghandler, &IMSMgr::_SS_Ping); + RegisterNetMsgHandler(&immsghandler, &CacheMgr::_SS_IM_UserOnline); + RegisterNetMsgHandler(&immsghandler, &CacheMgr::_SS_IM_UserOffline); + RegisterNetMsgHandler(&immsghandler, &CacheMgr::_SS_IM_PullUserList); + RegisterNetMsgHandler(&immsghandler, &CacheMgr::_SS_IM_IMServerList); } void HandlerMgr::ProcGMMsg(unsigned long saddr, int sockhandle, diff --git a/server/masterserver/precompile.h b/server/masterserver/precompile.h index 49c2658..50e6f1d 100644 --- a/server/masterserver/precompile.h +++ b/server/masterserver/precompile.h @@ -5,7 +5,6 @@ #include "constant.h" #include "types.h" -#include "error_code.h" #include "global.h" namespace google