From 0143819ddc7ba385baa28f15928f6e532692acdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Boh=C3=A1=C4=8Dek?= Date: Tue, 21 Dec 2021 22:19:04 +0100 Subject: [PATCH] fix: add missing packet event args --- .../NosSmooth.Core/Packets/PacketEventArgs.cs | 17 ++++++++++++++ Core/NosSmooth.Core/Packets/PacketType.cs | 23 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 Core/NosSmooth.Core/Packets/PacketEventArgs.cs create mode 100644 Core/NosSmooth.Core/Packets/PacketType.cs diff --git a/Core/NosSmooth.Core/Packets/PacketEventArgs.cs b/Core/NosSmooth.Core/Packets/PacketEventArgs.cs new file mode 100644 index 0000000..1d0b8cd --- /dev/null +++ b/Core/NosSmooth.Core/Packets/PacketEventArgs.cs @@ -0,0 +1,17 @@ +// +// PacketEventArgs.cs +// +// Copyright (c) František Boháček. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using NosCore.Packets.Interfaces; + +namespace NosSmooth.Core.Packets; + +/// +/// Arguments for +/// +/// The type of the packet. +/// The deserialized packet. +/// The packet string. +public record PacketEventArgs(PacketType Type, TPacket Packet, string PacketString); \ No newline at end of file diff --git a/Core/NosSmooth.Core/Packets/PacketType.cs b/Core/NosSmooth.Core/Packets/PacketType.cs new file mode 100644 index 0000000..afb2538 --- /dev/null +++ b/Core/NosSmooth.Core/Packets/PacketType.cs @@ -0,0 +1,23 @@ +// +// PacketType.cs +// +// Copyright (c) František Boháček. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace NosSmooth.Core.Packets; + +/// +/// The type of the packet. +/// +public enum PacketType +{ + /// + /// The packet was sent to the server. + /// + Sent, + + /// + /// The packet was received from the server. + /// + Received, +} \ No newline at end of file -- 2.48.1