Download multiple files
-
Hi, How can I download multiple files in same time with my C# applicaion, like is utoorent applicaion. I have list of docx files and i want to download all of them in same time. Thanks
By downloading each file in a different thread.
-
Hi, How can I download multiple files in same time with my C# applicaion, like is utoorent applicaion. I have list of docx files and i want to download all of them in same time. Thanks
Where from?
cdpsource wrote:
like is utoorent applicaion
So are they torrents? Or are they on a HTTP server? Or something else entirely? Anyway, consider using asynchronous methods instead of explicit threads. Or, if you want to be fancy, use one thread and Socket.Select[^]. You probably only have one network interface, and then using more than one thread to read from multiple sockets just means they end up taking turns anyway - a waste of resources, unless they do some significant processing with it (starting an asynchronous file-write wouldn't be significant).