1234567891011121314151617181920 |
- using System;
- namespace ET.Server
- {
- /// <summary>
- /// 心跳消息
- /// </summary>
- [MessageHandler(SceneType.Game)]
- public class C2G_PingHandler : AMRpcHandler<C2G_Ping, G2C_Ping>
- {
- protected override async ETTask Run(Session session, C2G_Ping request, G2C_Ping response, Action reply)
- {
- session.LastPingTime = TimeHelper.ClientNow();
- response.Time = TimeHelper.ServerNow();
- reply();
- await ETTask.CompletedTask;
- }
- }
- }
|