//static Requests request; private static void response(int i) { IRequests request = new Requests(new Uri("http://www.google.lt")); string response = request.SendRequests(); var map = new StringCruncher(response); map.CrunchString(); Console.WriteLine("Code: " + map.code.ResponseCode + " Start time: " + map.pr.ToShortTimeString() + ":" + map.pr.Millisecond + " Time taken: " + map.timeTaken + " Req. Nr.: " + i); }
private static void StartResponse(int i, URLs url, IDbBuffer<Responses> buffer) { IRequests request = new Requests(url.url); string response = request.SendRequests(); var map = new StringCruncher(response); map.CrunchString(); Responses responseEntitie = new Responses(); responseEntitie.ResponseCode = map.code; responseEntitie.ResponseTime = map.timeTaken; responseEntitie.RequestStartTime = map.pr; responseEntitie.URL = url; lock (buffer) { buffer.AddToBuffer(responseEntitie); } responsesGotten++; }