开发者

Is there a WCF server implementation of Web Sockets form HTML 5?

开发者 https://www.devze.com 2022-12-16 12:31 出处:网络
I would like to play with the new Web Socket support in Chrome (and soon Firefox), but have been unable to find a WCF implementation that will act as the server.

I would like to play with the new Web Socket support in Chrome (and soon Firefox), but have been unable to find a WCF implementation that will act as the server.

Have somebody implemented 开发者_如何学编程a .net WCF Web Socket based server?


The Web Socket protocol specification is so simple that you could implement a server to play with in a couple of hours. Assuming that you already have a TCP server component, it's just a matter of implementing the handshake (respond to a client request) and then receiving or sending data frames over TCP.

I used Delphi to implement the protocol and a chat server/client example; you can get the source code here. It shouldn't be very hard to translate it to .NET.


Recently the Interoperability Bridges and Labs Center released a prototype implementation (in managed code) of two drafts of the WebSockets protocol specification:

draft-hixie-thewebsocketprotocol-75 and draft-hixie-thewebsocketprotocol-76

The prototype can be found at HTML5 Labs. I put in this blog post all the information I found (until now) and snippets of code about how this can be done using WCF.


If you are still looking for a solution you may try this.

http://www.codeproject.com/KB/WCF/WCFWebApp.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号