I just wanna know if the .NET Framework 4.0 support Data Framing for sending of data via websocket from c#(Websocket server) to HTML5(client)?
I tried to google using that keyword however, I did not find any helpful information yet.
I just wanna know if the .NET Framework 4.0 support Data Framing for sending of data via websocket from c#(Websocket server) to HTML5(client)?
I tried to google using that keyword however, I did not find any helpful information yet.
.NET support for WebSockets was added in .NET 4.5. See MSDN docs on System.Net.WebSockets.AspNetWebSocket for details.
There is no built-in WebSocket support for .NET 4.0. Assuming moving to .NET 4.5 isn't an option for you, you can either write your own server (as I believe you've been trying) or use a third party .NET server. Lots of liberally licensed open source servers exist; I haven't used it but Fleck seems quite well regarded.
Maybe this stackoverflow answer can help you: How to (de)construct data frames in WebSockets hybi 08+?
The source code sample provided in the answer is in JavaScript, but you can convert it to C# as well.