Is WebClient the best way to download HTTP data?

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.

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?

+5
source share
2 answers

, , WebClient, HTTP-, . , , , Wireshark, URL-.

, , , - , , , . , . , ( ..), , , , .

, WebClient , , , , WebRequest. , WebClient.

+6

HttpWebRequest HttpWebResponse, , . , , , ( ), html HTTP-. , ...

0

All Articles