HTTP server with regular expression path matching, client and server SSL certificates, and a simplified request callback
Ejemplo n.º 1
0
 public CapsServer(IPAddress address, int port, X509Certificate sslCertificate, X509Certificate rootCA, bool requireClientCertificate)
 {
     serverOwned = true;
     capsHandler = BuildCapsHandler("^/");
     server = new WebServer(address, port, sslCertificate, rootCA, requireClientCertificate);
     server.LogWriter = new log4netLogWriter(Logger.Log);
 }
Ejemplo n.º 2
0
 public CapsServer(IPAddress address, int port)
 {
     serverOwned = true;
     capsHandler = BuildCapsHandler("^/");
     server = new WebServer(address, port);
     server.LogWriter = new log4netLogWriter(Logger.Log);
 }
Ejemplo n.º 3
0
 public CapsServer(WebServer httpServer, string handlerPath)
 {
     serverOwned = false;
     capsHandler = BuildCapsHandler(handlerPath);
     server = httpServer;
 }
Ejemplo n.º 4
0
 public EventQueueServer(WebServer server)
 {
     this.server = server;
 }
Ejemplo n.º 5
0
        void InitHttpServer(int port, bool ssl)
        {
            HttpServer = new WebServer(IPAddress.Any, port);

            // Login webpage HEAD request, used to check if the login webpage is alive
            HttpServer.AddHandler("head", null, "^/$", LoginWebpageHeadHandler);

            // Login webpage GET request, gets the login webpage data (purely aesthetic)
            HttpServer.AddHandler("get", null, @"^/(\?.*)?$", LoginWebpageGetHandler);

            // Client XML-RPC login
            HttpServer.AddHandler("post", "text/xml", "^/$", LoginXmlRpcPostHandler);

            // Client LLSD login
            HttpServer.AddHandler("post", "application/xml", "^/$", LoginLLSDPostHandler);

            HttpServer.Start();
        }