mirror of
https://github.com/AlexMacocian/MTSC.git
synced 2026-07-24 03:56:32 +00:00
- server now reads continiously instead of polling
- server increases reading delay when client is inactive - new procedure to check if the client is connected or not - ftphandler sets affinity to connected client
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using MTSC.Common.Ftp.FtpModules;
|
||||
using MTSC.Common.Http.RoutingModules;
|
||||
using MTSC.Common.Http.ServerModules;
|
||||
using MTSC.Exceptions;
|
||||
using MTSC.Logging;
|
||||
using MTSC.ServerSide;
|
||||
@@ -13,19 +15,18 @@ namespace MTSC_TestServer
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Server server = new Server(443);
|
||||
Server server = new Server(800);
|
||||
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(1024);
|
||||
server
|
||||
.WithCertificate(new X509Certificate2("powershellcert.pfx", "123"))
|
||||
//.WithCertificate(new X509Certificate2("powershellcert.pfx", "123"))
|
||||
.AddLogger(new ConsoleLogger())
|
||||
.AddLogger(new DebugConsoleLogger())
|
||||
.AddServerUsageMonitor(new TickrateEnforcer()
|
||||
.SetTicksPerSecond(60)
|
||||
.SetSilent(true))
|
||||
.AddExceptionHandler(new ExceptionConsoleLogger())
|
||||
//.AddHandler(new WebsocketHandler())
|
||||
//.AddHandler(new HttpHandler().AddHttpModule(new FileServerModule())
|
||||
// .AddHttpModule(new PostModule()))
|
||||
.AddHandler(new HttpRoutingHandler()
|
||||
.AddRoute(MTSC.Common.Http.HttpMessage.HttpMethods.Get, "hello", new Http200Module()))
|
||||
.AddHandler(new FtpHandler()
|
||||
.AddModule(new AuthenticationModule())
|
||||
.AddModule(new SystModule())
|
||||
|
||||
Reference in New Issue
Block a user