framework.proto 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. syntax = "proto3";
  2. package serverproto;
  3. option go_package = "./;serverproto";
  4. import "user.proto";
  5. //连接成功后服务器节点回复验证信息
  6. message ServiceIdentifyACK {
  7. string service_name = 1;
  8. string service_id = 2; //
  9. uint64 server_start_time = 3; //当前服务器的启动时间
  10. }
  11. message GateTransmitAck {
  12. uint32 msg_id = 1;
  13. bytes msg_data = 2;
  14. uint64 client_id = 3;
  15. uint32 seq_id = 4; //包序列号
  16. uint64 kv_time = 5; //for kv time test
  17. }
  18. //处理消息转发
  19. message ServiceTransmitAck {
  20. uint32 msg_id = 1;
  21. bytes msg_data = 2;
  22. uint64 client_id = 3;
  23. repeated uint64 client_id_list = 4;
  24. uint32 seq_id = 5; //包序列号,回复客户端使用
  25. bool is_master = 6; //aoi服务器使用
  26. uint64 kv_time = 7; //发送消息时的时间
  27. string from_service_node = 8; //
  28. string target_service_node = 9; //目的节点sid(特定服务器之前需要)
  29. }
  30. message ServiceTransmitRouterNtf {
  31. uint32 msg_id = 1;
  32. bytes msg_data = 2;
  33. uint64 client_id = 3;
  34. repeated uint64 client_id_list = 4;
  35. uint32 seq_id = 5; //包序列号,回复客户端使用
  36. bool is_master = 6; //aoi服务器使用
  37. uint64 kv_time = 7; //发送消息时的时间
  38. string from_service_node = 8; //
  39. int32 from_zone = 9; //消息所在区服
  40. string target_service_node = 10;
  41. }
  42. //客户端断开连接,通知后端服务器做断开处理操作
  43. message ClientClosedACK {
  44. uint64 id = 1; //客户端所在网关的sessionid
  45. string service_id = 2; //客户端在哪个网关
  46. }
  47. //服务器主动踢掉玩家(通知gate踢人)
  48. message SSUserKickNtf { //project gate
  49. int32 error = 1; //踢人原因
  50. uint64 client_id = 3;
  51. uint64 ban_end_time = 4; //封号结束时间s
  52. }
  53. //auth验证后的通知
  54. message SSLoginNtf { //project gate
  55. int32 error = 1; //错误码 0表示无错误
  56. uint64 client_id = 2; //客户端所在网关的sessionid
  57. UserConnectInfo conn_info = 3; //连接信息
  58. string sdk_param = 4; //验证成功后sdk返回信息
  59. }
  60. //保存连接信息
  61. message SSSaveUserConnectInfo { //project auth|db
  62. string open_id = 1; //openid
  63. UserConnectInfo conn_info = 3; //连接信息
  64. string platform = 4; //用户sdk登录平台
  65. string sdk_json =5;//小七的数据
  66. }
  67. //系统消息通知
  68. message SSSystemMessageNtf { //project social|game
  69. repeated SystemMessage sys_msg = 1;//公告消息
  70. }
  71. message SSReconnectReq { //project auth
  72. string open_id = 1; //平台账号ID
  73. string platform_token = 2; //平台token验证登陆
  74. }
  75. message SSReconnectAck { //project game
  76. string open_id = 1; //平台账号ID
  77. }
  78. //请求目标信息
  79. message SSGetViewedTargetInfoReq { //project social|game
  80. uint64 uid = 1; //uid
  81. uint64 t_uid = 2; //被查看Uid
  82. }
  83. message SSGetViewedTargetInfoAck { //project social|game
  84. uint64 uid = 1; //请求查看Uid
  85. uint64 t_uid = 2; //被查看Uid
  86. int32 error = 3; //错误码
  87. ViewRoleInfo info = 4; //目标
  88. }
  89. //获取social状态数据
  90. message SocialInitData {
  91. uint64 uid = 1;
  92. string service_node_id = 2;
  93. uint64 refresh_time = 3;
  94. }
  95. message SSGetSocialInitDataReq { //project social
  96. }
  97. message SSGetSocialInitDataAck { //project social
  98. repeated SocialInitData online_player_list = 1; //在线玩家列表
  99. repeated SocialInitData offline_player_list = 2; //离线玩家列表
  100. }
  101. //服务器heartbeat
  102. message PingReq {
  103. bool need_ack = 1; //是否需要回应
  104. }
  105. //获取当前服务器的赛季信息
  106. message ServerCompetitionInfo {
  107. int32 competition_id = 1;
  108. uint64 start_time = 2;
  109. uint64 end_time = 3;
  110. }
  111. message SSGetServerCompetitionReq { //project db
  112. }
  113. message SSGetServerCompetitionAck { //project game
  114. repeated ServerCompetitionInfo competition_data_list = 1; //当前已经进行到的赛季id(结束或者进行中)
  115. StRecRound roun_info =2; // 飞艇数据记录
  116. TowerRound tower_info =3;//本服务器无尽模式周期
  117. }
  118. message TowerRound {
  119. int32 Day =1;//本服务器无尽模式周期
  120. bool is_refresh =2;//本服务器是否有玩家本期达到1000层
  121. }
  122. //服务器保存赛季信息
  123. message SSServerCompetitionInfoSaveNtf { //project db
  124. ServerCompetitionInfo competition_data = 1;
  125. StRecRound round_info = 2;
  126. TowerRound tower_info =3;//本服务器无尽模式周期
  127. }
  128. //配置文件热加载
  129. message SSServerConfigReloadNtf { //project social|game
  130. repeated string cfg_list = 1; //配置文件名称列表 例如AdvertisingScreen,ActivitiesCfg,ActiveCodeCfg
  131. }
  132. message StRecRound {
  133. int32 over_round = 1; // 结束场次
  134. uint64 over_time = 2; // 结束时间
  135. uint64 start_ing_time= 3; // 下一轮开启时间
  136. }
  137. //social获取router对应各个类型的服务状态
  138. //例如通过gcrossrouter获取gcrossmap的服务器状态(例如aoi人数)
  139. message SSGetGServerStateReq { //project social|gcrossrouter
  140. int32 server_type = 1; //需要获取服务器状态的服务器类型(例如gcrossmap服务器类型为31)
  141. }
  142. message SSGetGServerStateAck { //project social|game
  143. int32 server_type = 1;
  144. repeated ServerStateInfo server_list = 2; //多个gcrossmap时就有多个
  145. }