Rebex WebSockets (beta)

Multiplatform WebSockets library for .NET 2.0-4.6, .NET CF 2.0-3.5, Xamarin.iOS, Xamarin.Android and Xamarin.Mac

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.

Download Rebex WebSockets client beta (trial) »

Supported platforms

Usage

Rebex WebSockets API resembles the one provided by .NET 4.5 with minor differences (such as WebSocketClient instead of ClientWebSocket) and some syntactic sugar (string-based Send and Receive methods):

C# sample code

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

Changelog

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.

Send us feedback

Do you have any comments, questions or suggestions? Either post at our support forum or contact us directly at support@rebex.net.