예제 #1
0
 /*
 // benchmarking variables
 protected DateTime handleRequestStart;
 protected DateTime handleRequestEnd;
 protected DateTime downloadPagesStart;
 protected DateTime downloadPagesEnd;
 protected DateTime transmitStart;
 protected DateTime transmitEnd;
 */
 //public static List<int> linksOnResultsPage = new List<int>();
 //public static List<int> imagesOnResultsPage = new List<int>();
 //public static List<int> imagesOnTargetPage = new List<int>();
 /// <summary>
 /// Constructor for a remote proxy's request handler.
 /// </summary>
 /// <param name="proxy">Proxy this request handler belongs to.</param>
 /// <param name="context">Client context.</param>
 public RemoteRequestHandler(RCRemoteProxy proxy, HttpListenerContext context)
     : base(proxy, context, REMOTE_REQUEST_PACKAGE_DEFAULT_TIMEOUT)
 {
     _quota = Properties.Settings.Default.DEFAULT_QUOTA;
     _package = new Package();
     _killYourself = false;
 }
예제 #2
0
        /*
        // benchmarking variables
        protected DateTime handleRequestStart;
        protected DateTime handleRequestEnd;
        protected DateTime downloadPagesStart;
        protected DateTime downloadPagesEnd;
        protected DateTime transmitStart;
        protected DateTime transmitEnd;
        */
        //public static List<int> linksOnResultsPage = new List<int>();
        //public static List<int> imagesOnResultsPage = new List<int>();
        //public static List<int> imagesOnTargetPage = new List<int>();
        /// <summary>
        /// Constructor for a remote proxy's request handler.
        /// </summary>
        /// <param name="proxy">Proxy this request handler belongs to.</param>
        /// <param name="socket">Client socket.</param>
        public RemoteRequestHandler(RCRemoteProxy proxy, Socket socket)
            : base(proxy, socket)
        {
            _requestId = _proxy.NextRequestId;
            _proxy.NextRequestId = proxy.NextRequestId + 1;
            _requestTimeout = REMOTE_REQUEST_PACKAGE_DEFAULT_TIMEOUT;

            _quota = DEFAULT_QUOTA;
            _package = new Package();
        }