WebSockets are becoming increasingly popular, but support in .NET is far from perfect. Versions of .NET prior to 4.5 don't support WebSockets at all, and even .NET 4.5 only supports WebSockets on Windows 8 or higher.
Rebex WebSockets combines Rebex networking library with Xamarin's open source WebSocket implementation. The result is a multi-platform library that works on both current and legacy platforms. WebSockets over a secure TLS/SSL channel are supported as well - including TLS 1.2, 1.1, 1.0, SNI and SHA-2.
Rebex WebSockets API resembles the one provided by .NET 4.5 with minor differences (such as
WebSocketClient instead of
and some syntactic sugar (string-based
... using Rebex.Net; ... // create an instace of WebSocket client var client = new WebSocketClient(); client.ValidatingCertificate += CustomCertificateValidator; // connect to a server client.Connect("ws://echo.websocket.org"); // send a message client.Send("Hello!"); // receive response string response = client.Receive
(); // display it Console.WriteLine(response);
2018-02-27 - Released an updated beta based on the latest version of Rebex HTTP and TLS core. 2016-09-15 - First beta of Rebex WebSockets released on Rebex Labs.