Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 WebSockets Client for .NET

Tags:

html

c#

websocket

So, I found that amazing thing called HTML5 WebSockets, new API. That is still in DRAFT version, but quite well supported. Full-duplex bi-directional communication. I know how to use it via JavaScript, there is APIs. But if I want to use a WebSocket client within my C#/.NET application, how to do that?

For example JavaScript: http://bohuco.net/blog/2010/07/html5-websockets-example/

Are there are any special client libraries for WebSockets in .NET?

like image 941
davidlt Avatar asked Feb 13 '11 17:02

davidlt


People also ask

Does .NET support WebSockets?

ASP.NET Core SignalR is a library that simplifies adding real-time web functionality to apps. It uses WebSockets whenever possible. For most applications, we recommend SignalR over raw WebSockets.

Is WebSocket an html5?

WebSockets is a next-generation bidirectional communication technology for web applications which operates over a single socket and is exposed via a JavaScript interface in HTML 5 compliant browsers.

Does SignalR use WebSockets?

SignalR uses the new WebSocket transport where available and falls back to older transports where necessary. While you could certainly write your app using WebSocket directly, using SignalR means that a lot of the extra functionality you would need to implement is already done for you.


2 Answers

sir SuperWebSocket include a WebSocket server implementation and a WebSocket client implementation. SuperWebSocket's project page

like image 121
Kerry Jiang Avatar answered Sep 24 '22 11:09

Kerry Jiang


I've recently done some research into this whilst building a .NET and Silverlight client library for Pusher. I found the following WebSocket client libraries and projects:

  • Microsoft WebSocket client prototype
  • SuperWebSocket note: there is a client in there, it's just difficult to find
  • WebSocket-Sharp
  • Anaida

For the moment the Microsoft implementation is probably the easiest to use and it also has a Silverlight library. SuperWebSockets has a Silverlight project in the source but not in the latest drop.

like image 27
leggetter Avatar answered Sep 22 '22 11:09

leggetter