continuity/Server/Packets/RawPacket.cs

37 lines
1 KiB
C#
Raw Normal View History

chore: .net 8 and extended pipeline support ci: again chore: dockerignore added chore(deps): update dependency benchmarkdotnet to v0.13.10 Signed-off-by: noreply@rainote.dev ci: dependency track can run on any branch ci: first attempt docker image ci: again ci: some fixes ci: idk ci: does this help ci: idk ci: another one ci: forgot ci: downgrade qemu setup ci: downgrade.. ci: v1 includes docker ci: rearrange ci: idk what to do with this ci: let's try cat ci: alt ci: depressing ci: yikes ci: ah come on ci: let's try new version again ci: again ci: another one ci: another one ci: confusion ci: try single ci: aaaa ci: one more time ci: again main (#69) Reviewed-on: https://forge.rainote.dev/wonderking/continuity/pulls/69 Co-authored-by: Timothy Schenk <admin@rainote.dev> Co-committed-by: Timothy Schenk <admin@rainote.dev> chore: ci jobs expanded & .net 8 support ci: branch name sanitization for docker ci: another attempt ci: forgot actor chore: remove nuke remnants chore(deps): update dependency dotnet-sdk to v7.0.403 Signed-off-by: noreply@rainote.dev refactor: shared data into library refactor: rewrite for packethandler/id map chore: logging chore: Sonar Warnings chore: upgrade to .net8 image chore: fetch all required information for characters chore: upgrade to .net 8 ci: install .net 7.0 alongside 8.0 for sbom fix: incorrect job ci: let's try arm64 again ci: adjust project for .net 8 support chore: adjustments to composefile chore: analyzer setup chore: analyzer and project settings updated chore: ci jobs expanded & .net 8 support
2023-11-01 21:06:02 +01:00
using Wonderking.Packets;
2023-10-12 09:15:34 +02:00
namespace Server.Packets;
2023-08-09 16:23:41 +02:00
using MassTransit;
2023-08-09 16:23:41 +02:00
[MessageUrn("packets")]
2023-08-09 20:14:14 +02:00
public class RawPacket
2023-08-09 16:23:41 +02:00
{
2023-08-09 20:14:14 +02:00
public RawPacket(OperationCode operationCode, byte[] messageBody, uint aliveTime, byte unknownValue2,
byte unknownValue, Guid sessionId, AuthSession session)
2023-08-09 16:23:41 +02:00
{
2023-08-11 11:31:30 +02:00
this.MessageBody = messageBody;
this.UnknownValue2 = unknownValue2;
this.UnknownValue = unknownValue;
this.SessionId = sessionId;
this.Session = session;
this.OperationCode = operationCode;
2023-08-10 08:51:40 +02:00
/*
* 20s = 5
* 15s = 4
* 10s = 3
* client alive time * 5s => uptime
*/
2023-08-11 11:31:30 +02:00
this.ClientAliveTime = TimeSpan.FromSeconds(5 * aliveTime);
2023-08-09 16:23:41 +02:00
}
public OperationCode OperationCode { get; }
public byte[] MessageBody { get; }
public TimeSpan ClientAliveTime { get; }
public byte UnknownValue { get; }
public byte UnknownValue2 { get; }
public Guid SessionId { get; }
public AuthSession Session { get; }
2023-08-11 11:31:30 +02:00
}