continuity/Server/Packets/RawPacket.cs

28 lines
829 B
C#
Raw Normal View History

2023-08-09 14:23:41 +00:00
using MassTransit;
namespace Server;
[MessageUrn("packets")]
2023-08-09 18:14:14 +00:00
public class RawPacket
2023-08-09 14:23:41 +00:00
{
public readonly OperationCode OperationCode;
public byte[] MessageBody;
2023-08-09 14:23:41 +00:00
public readonly TimeSpan ClientAliveTime;
public readonly byte UnknownValue;
public readonly byte UnknownValue2;
public readonly Guid SessionId;
public readonly AuthSession Session;
2023-08-09 18:14:14 +00:00
public RawPacket(OperationCode operationCode, byte[] messageBody, uint aliveTime, byte unknownValue2,
byte unknownValue, Guid sessionId, AuthSession session)
2023-08-09 14:23:41 +00:00
{
MessageBody = messageBody;
UnknownValue2 = unknownValue2;
UnknownValue = unknownValue;
SessionId = sessionId;
2023-08-09 18:14:14 +00:00
Session = session;
2023-08-09 14:23:41 +00:00
OperationCode = operationCode;
ClientAliveTime = TimeSpan.FromSeconds(5 * aliveTime);
}
}