2

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)?

https://www.google.com.ph/#hl=en&output=search&sclient=psy-ab&q=data+framing+support+in+.net+framework+4.0&oq=data+framing+support+in+.net+framework+4.0&gs_l=hp.3..33i29i30l2.9744.22482.0.22676.48.34.2.0.0.2.1006.13160.4-1j10j7j1.19.0.les%3B..0.0...1c.1.6.psy-ab.03DQYeQRUMw&pbx=1&bav=on.2,or.r_cp.r_qf.&bvm=bv.43828540,d.Yms&fp=134c94d72e3b7e00&biw=1244&bih=899

I tried to google using that keyword however, I did not find any helpful information yet.

Charmie
  • 2,468
  • 7
  • 33
  • 47
  • I found this with googling but I know nothing about Websocket so I cannot help you further: http://stackoverflow.com/questions/12931276/websocket-server-vb-net-data-frame – mostruash Mar 15 '13 at 02:48
  • There are several good solutions for websockets on .NET 4.0 and C#. XSockets.NET, Superwebsocket or Fleck are the most popular self hosted that I know of on the 4.0 platform. – Uffe Apr 29 '13 at 20:10

2 Answers2

3

.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.

simonc
  • 41,632
  • 12
  • 85
  • 103
0

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.

Community
  • 1
  • 1
Eriawan Kusumawardhono
  • 4,796
  • 4
  • 46
  • 49