Problem: I need to download hundreds of images from different hosts. Each host has from 20 to hundreds of images.
Solution: using new WebClientevery time the image needs to be loaded using the WebClient method DownloadData.
new WebClient
DownloadData
Or would it be better to keep a pool of open socket connections and make an HTTP request using lower level calls?
Is it worth it to open / close a tcp connection (I assume this is what WebClient does), so that using pools sounds more efficient?
, , WebClient, HTTP-, . , , , Wireshark, URL-.
WebClient
, , , - , , , . , . , ( ..), , , , .
, WebClient , , , , WebRequest. , WebClient.
WebRequest
HttpWebRequest HttpWebResponse, , . , , , ( ), html HTTP-. , ...
HttpWebRequest
HttpWebResponse