-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathCoapResponseEventArgs.cs
More file actions
39 lines (35 loc) · 1.16 KB
/
CoapResponseEventArgs.cs
File metadata and controls
39 lines (35 loc) · 1.16 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
using Waher.Networking.CoAP.Transport;
namespace Waher.Networking.CoAP
{
/// <summary>
/// Event arguments for CoAP response callbacks.
/// </summary>
public class CoapResponseEventArgs : CoapMessageEventArgs
{
private readonly object state;
private readonly bool ok;
/// <summary>
/// Event arguments for CoAP response callbacks.
/// </summary>
/// <param name="Client">UDP Client.</param>
/// <param name="Endpoint">CoAP Endpoint.</param>
/// <param name="Ok">If the request was successful or not.</param>
/// <param name="State">State object passed to the original request.</param>
/// <param name="Message">Response message.</param>
/// <param name="Resource">Resource</param>
internal CoapResponseEventArgs(ClientBase Client, CoapEndpoint Endpoint, bool Ok, object State, CoapMessage Message, CoapResource Resource)
: base(Client, Endpoint, Message, Resource)
{
this.ok = Ok;
this.state = State;
}
/// <summary>
/// If the request was successful or not.
/// </summary>
public bool Ok => this.ok;
/// <summary>
/// State object passed to the original request.
/// </summary>
public object State => this.state;
}
}