// Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License. using Continuity.AuthServer.Packets; using Continuity.AuthServer.Services; using MassTransit; namespace Continuity.AuthServer.Consumers; public class PacketConsumer : IConsumer { private readonly PacketDistributorService _distributorService; public PacketConsumer(PacketDistributorService distributorService) { _distributorService = distributorService; } public Task Consume(ConsumeContext context) { _distributorService.AddPacket(context.Message); return Task.CompletedTask; } }