continuity/Server/Packet.cs
2023-08-09 16:23:41 +02:00

24 lines
No EOL
734 B
C#

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