aboutsummaryrefslogtreecommitdiff
path: root/Tools/Hazel-Networking/Hazel/NewConnectionEventArgs.cs
diff options
context:
space:
mode:
authorchai <215380520@qq.com>2023-10-12 22:09:49 +0800
committerchai <215380520@qq.com>2023-10-12 22:09:49 +0800
commit8d2a2cd5de40e2b94ef5007c32832ed9a063dc40 (patch)
treea63dfbe815855925c9fb8f2804bd6ccfeffbd2eb /Tools/Hazel-Networking/Hazel/NewConnectionEventArgs.cs
parentdd0c5d50e377d9be1e728463670908a6c9d2c14f (diff)
+hazel-networking
Diffstat (limited to 'Tools/Hazel-Networking/Hazel/NewConnectionEventArgs.cs')
-rw-r--r--Tools/Hazel-Networking/Hazel/NewConnectionEventArgs.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/Tools/Hazel-Networking/Hazel/NewConnectionEventArgs.cs b/Tools/Hazel-Networking/Hazel/NewConnectionEventArgs.cs
new file mode 100644
index 0000000..c3fd62f
--- /dev/null
+++ b/Tools/Hazel-Networking/Hazel/NewConnectionEventArgs.cs
@@ -0,0 +1,22 @@
+namespace Hazel
+{
+ public struct NewConnectionEventArgs
+ {
+ /// <summary>
+ /// The data received from the client in the handshake.
+ /// You must not recycle this. If you need the message outside of a callback, you should copy it.
+ /// </summary>
+ public readonly MessageReader HandshakeData;
+
+ /// <summary>
+ /// The <see cref="Connection"/> to the new client.
+ /// </summary>
+ public readonly Connection Connection;
+
+ public NewConnectionEventArgs(MessageReader handshakeData, Connection connection)
+ {
+ this.HandshakeData = handshakeData;
+ this.Connection = connection;
+ }
+ }
+}