diff options
author | chai <chaifix@163.com> | 2020-12-30 20:59:04 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-12-30 20:59:04 +0800 |
commit | e9ea621b93fbb58d9edfca8375918791637bbd52 (patch) | |
tree | 19ce3b1c1f2d51eda6878c9d0f2c9edc27f13650 /Impostor-dev/src/Impostor.Hazel/NewConnectionEventArgs.cs |
+init
Diffstat (limited to 'Impostor-dev/src/Impostor.Hazel/NewConnectionEventArgs.cs')
-rw-r--r-- | Impostor-dev/src/Impostor.Hazel/NewConnectionEventArgs.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Impostor-dev/src/Impostor.Hazel/NewConnectionEventArgs.cs b/Impostor-dev/src/Impostor.Hazel/NewConnectionEventArgs.cs new file mode 100644 index 0000000..be9e7a2 --- /dev/null +++ b/Impostor-dev/src/Impostor.Hazel/NewConnectionEventArgs.cs @@ -0,0 +1,24 @@ +using Impostor.Api.Net.Messages; + +namespace Impostor.Hazel +{ + public struct NewConnectionEventArgs + { + /// <summary> + /// The data received from the client in the handshake. + /// This data is yours. Remember to recycle it. + /// </summary> + public readonly IMessageReader HandshakeData; + + /// <summary> + /// The <see cref="Connection"/> to the new client. + /// </summary> + public readonly Connection Connection; + + public NewConnectionEventArgs(IMessageReader handshakeData, Connection connection) + { + this.HandshakeData = handshakeData; + this.Connection = connection; + } + } +} |