如何端口的TcpClient和的NetworkStream Silverlight的?端口、TcpClient、Silverlight、NetworkStream

2023-09-04 01:17:46 作者:苏格拉没有底

为什么的TcpClient和的NetworkStream从Silverlight的缺失? 是否存在的TcpClient和的NetworkStream任何已知的端口Silverlight的? 如果没有,我是允许从.NET 4运行复制源代码code进我自己的图书馆? 如果不是这样,我该如何开始移植这些类Silverlight的?

Why are TCPClient and NetworkStream missing from Silverlight? Are there any known ports of TCPClient and NetworkStream to Silverlight? If there aren't, am I allowed to copy the source code from the .NET 4 runtime into my own library? If not, how do I start porting those classes to Silverlight?

推荐答案

有上的网络在Silverlight ,主要涉及到的Silverlight运行在浏览器沙盒的事实(如跨域策略,端口限制,等,这可以部分地通过使用OOB应用程序与宽松的安全模型)来解决。

There are quite some limitations on Networking in Silverlight, mostly related to the fact that Silverlight runs in a sandbox in the browser (e.g. cross domain policy, port restrictions, and other, which can partly be solved by using OOB applications with an relaxed security model).

不过,Silverlight提供了接一些支持,并有一些高层次的客户端实现了那里,像的这个。

However, Silverlight provides some support for Sockets, and there are some high-level client implementations out there, like this one.

这些都说不定了良好的基础,开始建立自己的港口,因为我想在.NET 4运行许可证不包括到餐桌源$ C ​​$ CS,甚至将它们移植到Silverlight的权利。

These are maybe a good foundation to start building your own ports, because I suppose the .NET 4 runtime license does not include the right to fork source codes, not even to port them to Silverlight.