Fixed project

This commit is contained in:
The Doctor
2020-06-18 12:22:25 +01:00
parent d94bfaef4c
commit d040f36100
17 changed files with 508 additions and 0 deletions

31
ExampleApp/Program.cs Normal file
View File

@ -0,0 +1,31 @@
using AsyncHttp;
using System.IO;
using System.Text;
namespace ExampleApp
{
class Program
{
[ServerPath(Method.GET, "/")]
public class IndexPath : IPath
{
public override void HandleRequest(Request request)
{
Response.Body = Encoding.UTF8.GetBytes("Hello Async World");
}
}
static void Main(string[] args)
{
Server server = new Server();
//server.CertificatePath = "cert.pfx";
//server.CertificatePassword = "1234";
server.StartAsync();
while (true)
{
// do whatever you want in the meanwhile
}
}
}
}