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