Exemplo n.º 1
0
        /// <summary>
        /// Reset web server.
        /// </summary>
        public void Reset()
        {
            listener.ProcessRequest -= ProcessRequest;
            listener.Dispose();

            listener = new WebListener();
            listener.ProcessRequest += ProcessRequest;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Volplane.Net.WebServer"/> class.
        /// Creates a local web server running on a specific port.
        /// </summary>
        /// <param name="port">The port.</param>
        /// <param name="localPath">Local path.</param>
        public WebServer(int port, string localPath)
        {
            this.port      = port;
            this.localPath = localPath;

            this.pathSeparatorReg = new Regex(@"[\\\/]");

            this.listener = new WebListener();
            this.listener.ProcessRequest += this.ProcessRequest;
        }