This commit is contained in:
aozhiwei 2020-06-16 15:18:30 +08:00
parent 995e839326
commit 12e6f6d7fb
2 changed files with 29 additions and 5 deletions

View File

@ -106,7 +106,21 @@ void SvrMgr::_SS_IM_ReportServerInfo(f8::MsgHdr& hdr, const ss::SS_IM_ReportServ
void SvrMgr::_SS_IM_IMServerList(f8::MsgHdr& hdr, const ss::SS_IM_IMServerList& msg)
{
SvrNode* node = GetNodeBySocket(hdr.socket_handle);
if (node) {
ss::SS_MS_IMServerList respmsg;
for (auto& pair : node_key_hash_) {
if (node != pair.second) {
auto p = respmsg.add_server_list();
p->set_instance_id(pair.second->instance_id);
p->set_online_num(pair.second->online_num);
p->set_ip(pair.second->ip);
p->set_port(pair.second->port);
p->set_servicing(pair.second->servicing);
}
}
IMListener::Instance()->SendMsg(hdr.socket_handle, respmsg);
}
}
void SvrMgr::___GSList(f8::JsonHttpRequest* request)

View File

@ -17,6 +17,15 @@ message MFIMMsgConext
optional int64 base_data_version = 100; //
}
message MFIMServerInfo
{
optional int32 instance_id = 1;
optional int32 online_num = 2;
optional string ip = 3;
optional int32 port = 4;
optional bool servicing = 5;
}
message MFBaseUserDataDB
{
optional string account_id = 1; //id
@ -149,21 +158,21 @@ message SS_MS_ConfirmedServerInfo
message SS_IM_UserOnline
{
optional string account_id = 1;
repeated cs.MFUserInfo user_infos = 1;
}
message SS_IM_UserOffline
{
optional string account_id = 1;
repeated string account_ids = 1;
}
message SS_IM_PullUserList
{
repeated string account_ids = 1;
}
message SS_MS_PushUserList
{
repeated cs.MFUserInfo user_infos = 1;
}
message SS_IM_SendChatMsg
@ -189,6 +198,7 @@ message SS_IM_IMServerList
}
message SS_MS_IMServerList
{
repeated MFIMServerInfo server_list = 1;
}
message SS_IM_UpdateUserInfo