continuity/Server/Packet.cs

24 lines
734 B
C#
Raw Normal View History

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