forked from PGR/ascnet
1
0
Fork 0
This commit is contained in:
Master 2023-10-14 20:02:55 +02:00
commit 133c4817b7
2 changed files with 27 additions and 1 deletions

View File

@ -36,6 +36,25 @@ namespace AscNet.GameServer.Handlers
DoLogin(session);
}
[RequestPacketHandler("ReconnectRequest")]
public static void ReconnectRequestHandler(Session session, Packet.Request packet)
{
session.SendResponse(new ReconnectResponse()
{
Code = 0,
OfflineMessages = { },
ReconnectToken = "eeeeeeeeeeeeeeh",
RequestNo = 0
}, packet.Id);
}
/* TODO
[RequestPacketHandler("ReconnectAck")]
public static void ReconnectAckHandler(Session session, Packet.Request packet)
{
}
*/
// TODO: Move somewhere else, also split.
static void DoLogin(Session session)
{

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);
}
}
}