BackgroundDownloader一次仅下载5个 [英] BackgroundDownloader only downloading 5 at once
问题描述
我使用BackgroundDownloader.CreateDownload
创建1,000个下载,然后通过执行DownloadOperation.Start
将其中的100个排队.如果我看着提琴手的流量,实际上只有5个立即发出.当一个完成时,另一个发送出去.
I create 1,000 downloads using BackgroundDownloader.CreateDownload
, then I queue up 100 of them by doing DownloadOperation.Start
. If I watch the traffic in fiddler, only 5 of them at actually send out at once. When one finishes, another is sent out.
是否可以同时发送更多邮件?
Is there a way to have more sent out concurrently?
推荐答案
是的,在 Windows.Networking.BackgroundTransfer 内一次最多只能下载5次.
Yes, there is a limit of 5 downloads at a time within Windows.Networking.BackgroundTransfer.
如果将所有下载标记为高优先级",则一次最多可以扩展6个下载,即:
You can extend it to up to 6 downloads at a time if you mark all your downloads as High Priority, i.e.:
var download = backgroundDownloader.CreateDownload(...);
download.Priority = BackgroundTransferPriority.High;
Task<DownloadOperation> task = download.StartAsync(...).AsTask();
这篇关于BackgroundDownloader一次仅下载5个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!