ASP.NET 上的 WebSockets 教程 [英] WebSockets Tutorial on ASP.NET
问题描述
在 ASP.NET 4.0 中是否有一个简单的、脚踏实地的示例/示例/教程来帮助我入门?我知道有人问过这个问题,但没有得到正确回答.有很多关于客户端的东西,但在ASP.NET中找不到关于服务器端的简单解释
Is there a simple, down to earth, sample/example/tutorial for WebSockets Server and Client implementation in ASP.NET 4.0 to get me started? I know this question has been asked, but it hasn't been answered properly. There is a lot of stuff about client side, but cannot find a simple explanation about server-side in ASP.NET
谢谢!
~更新:我找到了本教程,但无法使其工作,尝试连接后连接立即关闭.任何人都可以使它工作?http://www.undisciplinedbytes.com/2010/06/html-5-c-web-sockets-server-and-asp-net-client-implementation/
~Update: I Found this tutorial, but cannot make it work, the connection closes right after attempting to connect. any one can make it work? http://www.undisciplinedbytes.com/2010/06/html-5-c-web-sockets-server-and-asp-net-client-implementation/
推荐答案
ASP.NET 将不支持 WebSockets,直到 Windows Server 8/IIS 8.请参阅 此处.
ASP.NET won't support WebSockets until Windows Server 8/IIS 8. See here.
有这个教程,Windows 8 开发者预览版中的 WebSockets 入门,从 2011 年 9 月开始.
There's this tutorial, Getting started with WebSockets in the Windows 8 developer preview, from September 2011.
如果您想在 .NET 中查看工作的 WebSocket 服务器,我建议您查看开源的 SuperWebSocket.如果您只想使用 .NET WebSocket 服务器,那么 SuperWebSocket(再次)、XSockets 和 Fleck 值得一看.
If you want to see a working WebSocket server in .NET I'd recommend taking a look at SuperWebSocket which is open source. If you just want to use a .NET WebSocket server then SuperWebSocket (again), XSockets and Fleck are worth a look.
SignalR 还依赖于 Windows 8.请参阅 SignalR WebSockets 文档.
SignalR also relies on Windows 8. See the SignalR WebSockets docs.
这篇关于ASP.NET 上的 WebSockets 教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!