continuity/Server/Consumers/PacketConsumer.cs
Timothy Schenk 9f3007b10e
All checks were successful
Build, Package and Push Images / preprocess (push) Successful in 2s
Build, Package and Push Images / build (push) Successful in 25s
Build, Package and Push Images / sbom-scan (push) Successful in 49s
Build, Package and Push Images / container-build (push) Successful in 2m11s
Build, Package and Push Images / sonarqube (push) Successful in 2m12s
Build, Package and Push Images / container-sbom-scan (push) Successful in 39s
chore: reformatting
2023-11-19 17:07:28 +01:00

21 lines
513 B
C#

using MassTransit;
using Server.Packets;
using Server.Services;
namespace Server.Consumers;
public class PacketConsumer : IConsumer<RawPacket>
{
private readonly PacketDistributorService _distributorService;
public PacketConsumer(PacketDistributorService distributorService)
{
_distributorService = distributorService;
}
public Task Consume(ConsumeContext<RawPacket> context)
{
_distributorService.AddPacket(context.Message);
return Task.CompletedTask;
}
}