Timothy Schenk
1455bdd75a
All checks were successful
Test if Server can be built / build-server (push) Successful in 22s
18 lines
489 B
C#
18 lines
489 B
C#
namespace Server.Consumers;
|
|
|
|
using MassTransit;
|
|
using Packets;
|
|
using Services;
|
|
|
|
public class PacketConsumer : IConsumer<RawPacket>
|
|
{
|
|
private readonly PacketDistributorService distributorService;
|
|
|
|
public PacketConsumer(PacketDistributorService distributorService) => this.distributorService = distributorService;
|
|
|
|
public Task Consume(ConsumeContext<RawPacket> context)
|
|
{
|
|
this.distributorService.AddPacket(context.Message);
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|