framework.proto 5.2 KB

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