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?
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.
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.
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.
sir SuperWebSocket include a WebSocket server implementation and a WebSocket client implementation. SuperWebSocket's project page
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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With