/// <summary> /// Initializes a new instance of the <see cref="SimpleWebServer"/> class. /// Does not start the server automatically. /// If no file name is provided, index.html is returned (if it exists). /// </summary> /// <param name="prefix">The htpp address prefix.</param> /// <param name="rootDir">The root directory to serve the files from.</param> public SimpleWebServer(string prefix, string rootDir) { _rootDir = rootDir; _listener = new SimpleHttpListener(prefix) { OnReceivedRequest = OnReceivedRequest, }; }