Ejemplo n.º 1
0
		/**
		 * 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.
		 */
		
		internal HttpProcessor(Socket socket, ref ClientInterface commonCode, TimeSpan cacheTime) 
		{
			_socket = socket;
			_headers = new Hashtable();
			_commonCode = commonCode;
			_cacheTime = cacheTime;
		}
Ejemplo n.º 2
0
		public FBackup(ClientInterface newInterface)
		{
			InitializeComponent();

			_myInterface = newInterface;
			saveFileDialog1.InitialDirectory = 
				Environment.GetFolderPath(
					Environment.SpecialFolder.MyDocuments);
		}
Ejemplo n.º 3
0
		// ============================================================
		// Constructor

		internal HttpServer(ref ClientInterface CommonCode, TimeSpan CacheTime, int ServerPort) 
		{
			Trace.WriteLine("HttpServer: Creating in thread \"" + 
				System.Threading.Thread.CurrentThread.Name + "\" " +
				" ( " + Thread.CurrentThread.ManagedThreadId.ToString() + " ) " +
				DateTime.Now.ToLongTimeString());

			this.port = ServerPort;
			commonCode = CommonCode;
			cacheTime = CacheTime;
		}