// create an instance of WebSocket client
var client = new WebSocketClient();

// connect to a server
client.Connect("ws://echo.example.org");

// send a text message
client.Send("Hello!");

// receive a text message
string response = client.Receive();
Show me more code...
Rebex WebSocket is a WebSocket client library for .NET. It brings TLS 1.2, 1.1, SHA-2, SNI, AES/GCM and other modern security-related features to legacy platforms. It is designed to offer an easy-to-use API in addition to the advanced .NET ClientWebSocket API.

Why Rebex WebSocket

Multiplatform WebSocket client

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 WebSocket supports legacy platforms (including .NET Framework 2.0/3.5 and .NET Compact Framework 3.5/3.9) and works on legacy operating systems (Windows Vista, Windows XP SP3, Windows Mobile 5/6, Windows CE, Pocket PC, Windows Embedded Compact). Of course, modern platforms such as .NET Core are supported as well.

TLS 1.2 and SHA-2 certificates - even on Windows XP and Windows CE

Rebex WebSocket implements the following modern TLS features on all supported platforms:

  • TLS 1.2, 1.1, 1.0
  • Elliptic Curve DSA and Elliptic Curve Diffie-Hellman ciphers
    (requires plugin on some platforms)
  • AES/GCM ciphers
  • SHA-2 certificates
  • SHA-2 hashing algorithms
  • Server Name Indication (SNI) extension
  • Renegotiation Indication extension
  • Support for legacy SSL 3.0 protocol
And more...

Platform support

Rebex WebSocket supports C#, VB.NET and any other .NET language on following platforms:

  • .NET Framework
    2.0, 3.0, 3.5. 4.0, 4.5.x, 4.6.x, 4.7.x (32-bit and 64-bit) on Windows
  • .NET Core
    1.1, 2.0, 2.1, 2.2 (32-bit or 64-bit) on Windows, Linux and macOS
  • .NET Compact Framework
    3.5, 3.9 on Windows Mobile, Windows CE, Pocket PC, Windows Embedded Compact 7, Windows Embedded Compact 2013
  • Mono
    4.x, 5.x on Linux and Apple macOS (OS X)
  • Xamarin.iOS
    Xamarin.iOS 10.3 or later
  • Xamarin.Android
    Xamarin.Android 8.0 or later

Supports .NET Standard on .NET Core.

Experimental support for Universal Windows Platform on Windows 10 and Windows 10 IoT.

Experimental support for Xamarin.Mac 3.8 and higher.