/** * 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; }
public FBackup(ClientInterface newInterface) { InitializeComponent(); _myInterface = newInterface; saveFileDialog1.InitialDirectory = Environment.GetFolderPath( Environment.SpecialFolder.MyDocuments); }
// ============================================================ // 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; }