我正在尝试创建一个应用程序作为我的音乐播放器的 Remote 。我刚刚为我的代码编写了一个不错的库,现在我注意到没有用于 Windows Phone 8.1 的名为 System.Net.Sockets 的程序集? 必须有一个解决方案,但我就是找不到。有谁知道如何将它导入到我的项目中?
请您参考如下方法:
根据 Microsoft ,您应该改用 Windows.Networking.Sockets:
The Windows Runtime API, Windows.Networking.Sockets, has been adopted for Windows Phone 8. It has been implemented as a Windows Phone Runtime API, making it easy to use in whatever supported programming language you choose. Although we've enhanced the .NET API, System.Net.Sockets, to support more features such as IPv6 and listener sockets, you should consider using the new API for sockets programming because it is more portable than the .NET API. Windows.Networking.Sockets has been built from the ground up to be clean, secure, and easy-to-use APIs that enforce best practices.
在 WinRT 中,这就是您需要做的。这是一个 answer到相关问题以进一步阅读。
