summaryrefslogtreecommitdiff
path: root/Impostor-dev/src/Impostor.Hazel/DataReceivedEventArgs.cs
blob: 9176d8d935ec88dd32897cce5d31eab7ac28bc9a (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
25
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;
        }
    }
}