Windows Universal App维护开放的WebSocket

And*_*rei 3 .net c# websocket windows-phone win-universal-app

如何在Windows Universal App上打开WebSocket?即使应用程序关闭,我可以让我的WebSocket打开吗?

Rob*_*SFT 6

在Windows Universal应用程序?是.在Windows Phone 8.1应用程序?没有.

即使主应用程序已挂起,Windows应用商店应用也可以使用ControlChannelTrigger在后台任务中接收套接字通知.这在Windows开发人员中心的ControlChannelTrigger StreamWebSocket示例中进行了演示.

Windows Phone Store应用程序不支持ControlChannelTrigger,但移动设备上的Universal Windows 10应用程序支持它.

  • 它不在Universal API Contract中,因此您需要添加引用(右键单击Project的References并选择Add Reference ...)到"UWP的Windows桌面扩展"或"Windows Mobile Extensions for the UWP". UWP".这些都在"参考管理器"窗口的"通用Windows /扩展"部分中. (2认同)