Added Ping handler, reconnection MIGHT work now

This commit is contained in:
Kyle Belanger
2023-10-14 14:01:21 -04:00
parent 296bdd11e5
commit 2cb46f545a
2 changed files with 27 additions and 1 deletions

View File

@@ -14,6 +14,13 @@ namespace AscNet.GameServer.Handlers
session.SendResponse(heartbeatResponse, packet.Id);
}
// TODO: Pong?
[RequestPacketHandler("Ping")]
public static void PingHandler(Session session, Packet.Request packet)
{
session.SendResponse(new Pong()
{
UtcTime = (ulong)DateTimeOffset.UtcNow.UtcTicks
}, packet.Id);
}
}
}