private static Task StartProcessingAsync(IDataCollectionRequestHandler requestHandler) { return(Task.Run(() => { // Wait for the connection to the sender and start processing requests from sender if (requestHandler.WaitForRequestSenderConnection(ClientListenTimeOut)) { requestHandler.ProcessRequests(); } else { EqtTrace.Info("DataCollector: RequestHandler timed out while connecting to the Sender."); requestHandler.Close(); throw new TimeoutException(); } })); }
internal DataCollectorMain(IProcessHelper processHelper, IEnvironment environment, IDataCollectionRequestHandler requestHandler) { this.processHelper = processHelper; this.environment = environment; this.requestHandler = requestHandler; }