framework.proto 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. }
  66. //系统消息通知
  67. message SSSystemMessageNtf { //project social|game
  68. repeated SystemMessage sys_msg = 1;//公告消息
  69. }
  70. message SSReconnectReq { //project auth
  71. string open_id = 1; //平台账号ID
  72. string platform_token = 2; //平台token验证登陆
  73. }
  74. message SSReconnectAck { //project game
  75. string open_id = 1; //平台账号ID
  76. }
  77. //请求目标信息
  78. message SSGetViewedTargetInfoReq { //project social|game
  79. uint64 uid = 1; //uid
  80. uint64 t_uid = 2; //被查看Uid
  81. }
  82. message SSGetViewedTargetInfoAck { //project social|game
  83. uint64 uid = 1; //请求查看Uid
  84. uint64 t_uid = 2; //被查看Uid
  85. int32 error = 3; //错误码
  86. ViewRoleInfo info = 4; //目标
  87. }
  88. //获取social状态数据
  89. message SocialInitData {
  90. uint64 uid = 1;
  91. string service_node_id = 2;
  92. uint64 refresh_time = 3;
  93. }
  94. message SSGetSocialInitDataReq { //project social
  95. }
  96. message SSGetSocialInitDataAck { //project social
  97. repeated SocialInitData online_player_list = 1; //在线玩家列表
  98. repeated SocialInitData offline_player_list = 2; //离线玩家列表
  99. }
  100. //服务器heartbeat
  101. message PingReq {
  102. bool need_ack = 1; //是否需要回应
  103. }
  104. //获取当前服务器的赛季信息
  105. message ServerCompetitionInfo {
  106. int32 competition_id = 1;
  107. uint64 start_time = 2;
  108. uint64 end_time = 3;
  109. }
  110. message SSGetServerCompetitionReq { //project db
  111. }
  112. message SSGetServerCompetitionAck { //project game
  113. repeated ServerCompetitionInfo competition_data_list = 1; //当前已经进行到的赛季id(结束或者进行中)
  114. StRecRound roun_info =2; // 飞艇数据记录
  115. }
  116. //服务器保存赛季信息
  117. message SSServerCompetitionInfoSaveNtf { //project db
  118. ServerCompetitionInfo competition_data = 1;
  119. StRecRound round_info = 2;
  120. }
  121. //配置文件热加载
  122. message SSServerConfigReloadNtf { //project social|game
  123. repeated string cfg_list = 1; //配置文件名称列表 例如AdvertisingScreen,ActivitiesCfg,ActiveCodeCfg
  124. }
  125. message StRecRound {
  126. int32 over_round = 1; // 结束场次
  127. uint64 over_time = 2; // 结束时间
  128. uint64 start_ing_time= 3; // 下一轮开启时间
  129. }
  130. //social获取router对应各个类型的服务状态
  131. //例如通过gcrossrouter获取gcrossmap的服务器状态(例如aoi人数)
  132. message SSGetGServerStateReq { //project social|gcrossrouter
  133. int32 server_type = 1; //需要获取服务器状态的服务器类型(例如gcrossmap服务器类型为31)
  134. }
  135. message SSGetGServerStateAck { //project social|game
  136. int32 server_type = 1;
  137. repeated ServerStateInfo server_list = 2; //多个gcrossmap时就有多个
  138. }