Category Archives: C#

WebSocket provides the bi-directional communication, which allows data to be sent back and forth at the same time, without requiring to request from server or client. So once the WebSocket connection is established, data can be pushed across without either side having to ask for it.

Following is the best references to get started with understanding all about websockets and its benefits.

There are many WebSocket libraries available to support the development of WebSocket server in C# .net, but the most efficient, and one of the easiest to use is the Alchemy Websockets (http://alchemywebsockets.net/)

The current version (2.2.1.238) supports the latest Google chrome, Mozilla Firefox, Safari on mac/windows and mobile devices (iPhone/iPad).

Note: If websocket server and webserver are running on the different machines, make sure to change the websocket server address (‘ws://localhost:8100’) with correct IP address or hostname.

Now lets see how it works. Open up browser and navigate to the URL where you have published “client.html”.
Its working fine for me on Google Chrome (19.0.1084.56 m), Mozilla Firefox (13.0), Safari (5.1.7 – 7534.57.2), Safari on iPhone/iPad (iOS 5.1.1-9B206)

Console Messages

Isn’t that so simple to implement websocket with your favorite language C# .NET.
Thanks to OLIVINE LABS (http://olivinelabs.com/) for making this library available under MIT and LGPL licenses.