summaryrefslogtreecommitdiff
path: root/Impostor-dev/src/Impostor.Hazel/DataReceivedEventArgs.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2020-12-30 20:59:04 +0800
committerchai <chaifix@163.com>2020-12-30 20:59:04 +0800
commite9ea621b93fbb58d9edfca8375918791637bbd52 (patch)
tree19ce3b1c1f2d51eda6878c9d0f2c9edc27f13650 /Impostor-dev/src/Impostor.Hazel/DataReceivedEventArgs.cs
+init
Diffstat (limited to 'Impostor-dev/src/Impostor.Hazel/DataReceivedEventArgs.cs')
-rw-r--r--Impostor-dev/src/Impostor.Hazel/DataReceivedEventArgs.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/Impostor-dev/src/Impostor.Hazel/DataReceivedEventArgs.cs b/Impostor-dev/src/Impostor.Hazel/DataReceivedEventArgs.cs
new file mode 100644
index 0000000..9176d8d
--- /dev/null
+++ b/Impostor-dev/src/Impostor.Hazel/DataReceivedEventArgs.cs
@@ -0,0 +1,26 @@
+using Impostor.Api.Net.Messages;
+
+namespace Impostor.Hazel
+{
+ public struct DataReceivedEventArgs
+ {
+ public readonly Connection Sender;
+
+ /// <summary>
+ /// The bytes received from the client.
+ /// </summary>
+ public readonly IMessageReader Message;
+
+ /// <summary>
+ /// The <see cref="Type"/> the data was sent with.
+ /// </summary>
+ public readonly MessageType Type;
+
+ public DataReceivedEventArgs(Connection sender, IMessageReader msg, MessageType type)
+ {
+ this.Sender = sender;
+ this.Message = msg;
+ this.Type = type;
+ }
+ }
+}