aboutsummaryrefslogtreecommitdiff
path: root/Tools/Hazel-Networking/Hazel/DisconnectedEventArgs.cs
blob: a7fb05cab8967b554ab15dd995d7ac42c119ea4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;

namespace Hazel
{
    public class DisconnectedEventArgs : EventArgs
    {
        /// <summary>
        /// Optional disconnect reason. May be null.
        /// </summary>
        public readonly string Reason;

        /// <summary>
        /// Optional data sent with a disconnect message. May be null. 
        /// You must not recycle this. If you need the message outside of a callback, you should copy it.
        /// </summary>
        public readonly MessageReader Message;

        public DisconnectedEventArgs(string reason, MessageReader message)
        {
            this.Reason = reason;
            this.Message = message;
        }
    }
}