windows-8 - Windows RT 中的网络资源限制

标签 windows-8 microsoft-metro windows-store-apps

根据Introduction to Background Tasks第20页,在网络资源限制下,后台任务每15分钟可以下载4.69 MB。

这是否意味着,在 Windows RT 中,如果我们在后台通过 IE10 Metro 下载 20MB 文件,需要花费 40 多分钟? (否则我们得把下载进度放在前面)

此外,作为后台应用程序,您不得使用超过 0.002% 的 CPU。

在同一页上,他们这样争论:

Network usage can represent a significant drain on a device battery, and so it is also constrained during background task execution. However, if a device is running on AC power, then background tasks are not network constrained. They are free to use as much network bandwidth as they need (gated, of course, by any carrier-specific bandwidth or usage constraints). Note that CPU usage for a background task is always resource constrained even if the device is running on AC power.

正是由于这些原因,我们无法为 Windows RT 实现下载管理器? 征得用户同意怎么样?

最佳答案

有用于卸载下载的API供系统后台管理: see Mike Taulty's blog entry on this 。在后台模式下的 WinRT 应用程序还有其他严格的限制,这些限制通常不会在博客文章和论坛中讨论,例如您的后台任务在与您的应用程序不同的进程或线程单元中运行:在白皮书 linked to above 中,请参阅有关后台任务主机可执行文件的部分。它表示,除非您的后台任务是 PushNotificationTrigger 或 ControlChannelTrigger,否则您的任务是由 BackgroundTaskHost.exe 或 WWAHost.exe 运行的进程内服务器。即使在前两种“在同一个应用程序中”运行的情况下,它也是在一个单独的公寓中。这些都只能通过将数据编码到文件或 ApplicationData 存储中来与主应用程序共享数据。

我尝试了 ControlChannelTrigger 并发现了以下限制(如果您发现它们,也会在文档中列出):

  • 在连接套接字之前, channel 必须与套接字关联
  • 应用程序只能使用有限数量的 ControlChannel,即使指定了软件 channel (在我的例子中为 6 个)

关于windows-8 - Windows RT 中的网络资源限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12703538/

相关文章:

c# - 如何从 Windows 商店应用程序启动桌面应用程序?

c# - 使用 x :Bind? 时,UpdateSourceTrigger=PropertyChanged 的​​等效项是什么

powershell - 如何在 Windows 8 中从 CMD 或 PowerShell 切换飞行模式

c# - 如何在 WinRT 中枚举颜色?

c# - Listview win8 xaml如何创建列?

c# - 将解决方案升级到 Windows 8.1 后出现神秘的构建错误

c# - 如何向用户请求使用 Windows 应用商店应用中的位置的权限?

c# - 更新 Windows 8 C# Metro 应用程序的 GUI

c# - 添加元素后刷新 ListView

c# - .NET Windows 应用商店应用程序中 CultureInfo.GetCultures 的替代品