C2G_PingHandler.cs 414 B

123456789101112131415161718
  1. using System;
  2. namespace ET.Server
  3. {
  4. /// <summary>
  5. /// 心跳消息
  6. /// </summary>
  7. [MessageHandler(SceneType.Game)]
  8. public class C2G_PingHandler : AMRpcHandler<C2G_Ping, G2C_Ping>
  9. {
  10. protected override async ETTask Run(Session session, C2G_Ping request, G2C_Ping response, Action reply)
  11. {
  12. response.Time = TimeHelper.ClientNow();
  13. reply();
  14. await ETTask.CompletedTask;
  15. }
  16. }
  17. }