diff options
Diffstat (limited to 'Tools/Hazel-Networking/Hazel/NewConnectionEventArgs.cs')
-rw-r--r-- | Tools/Hazel-Networking/Hazel/NewConnectionEventArgs.cs | 22 |
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; + } + } +} |