c# - What's the easiest way of making several web requests in a row? -
I have a list of URLs, and I object to an HTTP web request, and attempts to connect with it I have an 'array' of URL, and I try to connect with each one. The objective is to see who are out.
It already works, but a request only starts as if the last one ends, so it is working very slow, about two requests per second In.
I was thinking that I should work with 5 threads in the background, which will make it 5 times faster, which is the desired speed (to overload the shared internet band). But I have two problems:
1- I do not even know that this is the best solution to my problem. 2 - I have tried some time, but I'm new to the .NET framework, and have never used multi-thread, so I do not know how I can do it easily.
I have a function started (), and for this all the checks for the URL are in existence.
Data: VS 08, .NET 3.5, C #. [Edit] -
Can someone tell me (if possible, with code sample) how to use five as the background is possible) threads? What's going to start right after the last processing is over?
Review the Backgrounder Object This allows you to instill many thread listeners to instantiate asynchronous web requests. Will allow. Then use reportproduction method to report on the status of each request.
Comments
Post a Comment