// WingsEmu // // Developed by NosWings Team using System; using System.Threading.Tasks; using WingsEmu.Game.Networking; using WingsEmu.Packets; namespace WingsEmu.Game._packetHandling; public interface IPacketHandlerContainer where T : IPacketHandler { /// /// Registers the given packet handler for the given packetType /// /// /// void Register(Type packetType, T handler); /// /// Unregisters the given packetType from the container /// /// void Unregister(Type packetType); /// /// Executes the given packet with the given packetType /// assuming that the sender is the given session /// /// /// /// void Execute(IClientSession session, IClientPacket packet, Type packetType); /// /// Asynchronously executes the given packet with the given packetType /// assuming that the sender is the given session /// /// /// /// /// Task ExecuteAsync(IClientSession session, IClientPacket packet, Type packetType); }