146 lines
5.2 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package serverproto;
import "user.proto";
//连接成功后服务器节点回复验证信息
message ServiceIdentifyACK {
string service_name = 1;
string service_id = 2; //
uint64 server_start_time = 3; //当前服务器的启动时间
}
message GateTransmitAck {
uint32 msg_id = 1;
bytes msg_data = 2;
uint64 client_id = 3;
uint32 seq_id = 4; //包序列号
uint64 kv_time = 5; //for kv time test
}
//处理消息转发
message ServiceTransmitAck {
uint32 msg_id = 1;
bytes msg_data = 2;
uint64 client_id = 3;
repeated uint64 client_id_list = 4;
uint32 seq_id = 5; //包序列号,回复客户端使用
bool is_master = 6; //aoi服务器使用
uint64 kv_time = 7; //发送消息时的时间
string from_service_node = 8; //
string target_service_node = 9; //目的节点sid(特定服务器之前需要)
}
message ServiceTransmitRouterNtf {
uint32 msg_id = 1;
bytes msg_data = 2;
uint64 client_id = 3;
repeated uint64 client_id_list = 4;
uint32 seq_id = 5; //包序列号,回复客户端使用
bool is_master = 6; //aoi服务器使用
uint64 kv_time = 7; //发送消息时的时间
string from_service_node = 8; //
int32 from_zone = 9; //消息所在区服
string target_service_node = 10;
}
//客户端断开连接,通知后端服务器做断开处理操作
message ClientClosedACK {
uint64 id = 1; //客户端所在网关的sessionid
string service_id = 2; //客户端在哪个网关
}
//服务器主动踢掉玩家(通知gate踢人)
message SSUserKickNtf { //project gate
int32 error = 1; //踢人原因
uint64 client_id = 3;
uint64 ban_end_time = 4; //封号结束时间s
}
//auth验证后的通知
message SSLoginNtf { //project gate
int32 error = 1; //错误码 0表示无错误
uint64 client_id = 2; //客户端所在网关的sessionid
UserConnectInfo conn_info = 3; //连接信息
string sdk_param = 4; //验证成功后sdk返回信息
}
//保存连接信息
message SSSaveUserConnectInfo { //project auth|db
string open_id = 1; //openid
UserConnectInfo conn_info = 3; //连接信息
string platform = 4; //用户sdk登录平台
}
//系统消息通知
message SSSystemMessageNtf { //project social|game
repeated SystemMessage sys_msg = 1;//公告消息
}
message SSReconnectReq { //project auth
string open_id = 1; //平台账号ID
string platform_token = 2; //平台token验证登陆
}
message SSReconnectAck { //project game
string open_id = 1; //平台账号ID
}
//请求目标信息
message SSGetViewedTargetInfoReq { //project social|game
uint64 uid = 1; //uid
uint64 t_uid = 2; //被查看Uid
}
message SSGetViewedTargetInfoAck { //project social|game
uint64 uid = 1; //请求查看Uid
uint64 t_uid = 2; //被查看Uid
int32 error = 3; //错误码
ViewRoleInfo info = 4; //目标
}
//获取social状态数据
message SocialInitData {
uint64 uid = 1;
string service_node_id = 2;
uint64 refresh_time = 3;
}
message SSGetSocialInitDataReq { //project social
}
message SSGetSocialInitDataAck { //project social
repeated SocialInitData online_player_list = 1; //在线玩家列表
repeated SocialInitData offline_player_list = 2; //离线玩家列表
}
//服务器heartbeat
message PingReq {
bool need_ack = 1; //是否需要回应
}
//获取当前服务器的赛季信息
message ServerCompetitionInfo {
int32 competition_id = 1;
uint64 start_time = 2;
uint64 end_time = 3;
}
message SSGetServerCompetitionReq { //project db
}
message SSGetServerCompetitionAck { //project game
repeated ServerCompetitionInfo competition_data_list = 1; //当前已经进行到的赛季id结束或者进行中
StRecRound roun_info =2; // 飞艇数据记录
}
//服务器保存赛季信息
message SSServerCompetitionInfoSaveNtf { //project db
ServerCompetitionInfo competition_data = 1;
StRecRound round_info = 2;
}
//配置文件热加载
message SSServerConfigReloadNtf { //project social|game
repeated string cfg_list = 1; //配置文件名称列表 例如AdvertisingScreen,ActivitiesCfg,ActiveCodeCfg
}
message StRecRound {
int32 over_round = 1; // 结束场次
uint64 over_time = 2; // 结束时间
uint64 start_ing_time= 3; // 下一轮开启时间
}
//social获取router对应各个类型的服务状态
//例如通过gcrossrouter获取gcrossmap的服务器状态(例如aoi人数)
message SSGetGServerStateReq { //project social|gcrossrouter
int32 server_type = 1; //需要获取服务器状态的服务器类型(例如gcrossmap服务器类型为31)
}
message SSGetGServerStateAck { //project social|game
int32 server_type = 1;
repeated ServerStateInfo server_list = 2; //多个gcrossmap时就有多个
}