1
using Libplanet.Stun.Attributes;
2

3
namespace Libplanet.Stun.Messages
4
{
5
    public class AllocateErrorResponse : StunMessage
6
    {
7 0
        public override MessageClass Class => MessageClass.ErrorResponse;
8

9 0
        public override MessageMethod Method => MessageMethod.Allocate;
10

11
        public int ErrorCode
12
        {
13
            get
14 1
            {
15 1
                ErrorCode attr = GetAttribute<ErrorCode>();
16 1
                return attr.Code;
17 1
            }
18
        }
19

20
        public string Reason
21
        {
22
            get
23 0
            {
24 0
                ErrorCode attr = GetAttribute<ErrorCode>();
25 0
                return attr?.Reason;
26 0
            }
27
        }
28

29
        public byte[] Nonce
30
        {
31
            get
32 1
            {
33 1
                Attributes.Nonce attr = GetAttribute<Attributes.Nonce>();
34 1
                return attr?.Value;
35 1
            }
36
        }
37

38
        public string Realm
39
        {
40
            get
41 1
            {
42 1
                Realm attr = GetAttribute<Realm>();
43 1
                return attr?.Value;
44 1
            }
45
        }
46
    }
47
}

Read our documentation on viewing source code .

Loading