public HttpServer(Int32 HTTP_Port, String HTTP_ListeningIP, String HTTP_DocumentRoot, ConsoleOutputLogger Logger) { HTTPServer_Port = HTTP_Port; HTTPServer_ListeningIP = HTTP_ListeningIP; HTTPServer_DocumentRoot = HTTP_DocumentRoot; ConsoleOutputLogger = Logger; ThumbCache = new ThumbnailCache(GalleryServer.Properties.Settings.Default.CacheImages); }
/// <summary> /// Each HTTP processor object handles one client. If Keep-Alive is enabled then this /// object will be reused for subsequent requests until the client breaks keep-alive. /// This usually happens when it times out. Because this could easily lead to a DoS /// attack, we keep track of the number of open processors and only allow 100 to be /// persistent active at any one time. Additionally, we do not allow more than 500 /// outstanding requests. /// </summary> /// <param name="docRoot">Root-Directory of the HTTP Server</param> /// <param name="s">the Socket to work with</param> /// <param name="webserver">the "master" HttpServer Object of this Client</param> public HttpProcessor(Socket s, String HTTP_DocumentRoot, ConsoleOutputLogger Logger, ThumbnailCache Thumb_Cache) { this.s = s; HTTPServer_DocumentRoot = HTTP_DocumentRoot; docRootFile = new FileInfo(HTTPServer_DocumentRoot); headers = new Hashtable(); ConsoleOutputLogger = Logger; FileManager = new FileManagement(); ThumbCache = Thumb_Cache; }