예제 #1
0
		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);
        }
예제 #2
0
		/// <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;
		}
예제 #3
0
파일: Main.cs 프로젝트: jmhdz/GalleryServer
		public static void Main (string[] args)
		{
			#region ConsoleOutputLogger
			ConsoleOutputLogger ConsoleOutputLogger = new ConsoleOutputLogger();
			ConsoleOutputLogger.verbose = true;
			ConsoleOutputLogger.writeLogfile = false;
			#endregion

			#region Logo
			#endregion

			ConsoleOutputLogger.writeLogfile = true;

			#region Start HTTP Server
			HttpServer httpServer = new HttpServer(Properties.Settings.Default.HTTPPort, Properties.Settings.Default.HTTPIP, Properties.Settings.Default.WebPath, ConsoleOutputLogger);
			Thread http_server_thread = new Thread(new ThreadStart(httpServer.listen));
			http_server_thread.Start();
			#endregion
		}
예제 #4
0
        public static void Main(string[] args)
        {
            #region ConsoleOutputLogger
            ConsoleOutputLogger ConsoleOutputLogger = new ConsoleOutputLogger();
            ConsoleOutputLogger.verbose      = true;
            ConsoleOutputLogger.writeLogfile = false;
            #endregion

            #region Logo
            #endregion

            ConsoleOutputLogger.writeLogfile = true;

            #region Start HTTP Server
            HttpServer httpServer         = new HttpServer(Properties.Settings.Default.HTTPPort, Properties.Settings.Default.HTTPIP, Properties.Settings.Default.WebPath, ConsoleOutputLogger);
            Thread     http_server_thread = new Thread(new ThreadStart(httpServer.listen));
            http_server_thread.Start();
            #endregion
        }