forked from PeterWaher/IoTGateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHttpAsynchronousResource.cs
More file actions
39 lines (36 loc) · 1.18 KB
/
HttpAsynchronousResource.cs
File metadata and controls
39 lines (36 loc) · 1.18 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 System;
using System.Collections.Generic;
using System.Text;
namespace Waher.Networking.HTTP
{
/// <summary>
/// Base class for all asynchronous HTTP resources.
/// An asynchronous resource responds outside of the method handler,
/// from a separate thread or task. The application is responsible
/// for returning the response and disposing of the response object
/// when done.
/// </summary>
public abstract class HttpAsynchronousResource : HttpResource
{
/// <summary>
/// Base class for all asynchronous HTTP resources.
/// An asynchronous resource responds outside of the method handler,
/// from a separate thread or task. The application is responsible
/// for returning the response and disposing of the response object
/// when done.
/// </summary>
/// <param name="ResourceName">Name of resource.</param>
public HttpAsynchronousResource(string ResourceName)
: base(ResourceName)
{
}
/// <summary>
/// If the resource is synchronous (i.e. returns a response in the method handler), or if it is asynchronous
/// (i.e. sends the response from another thread).
/// </summary>
public override bool Synchronous
{
get { return false; }
}
}
}