WebSocket4Net 1.0.0-beta.5

WebSocket4Net

build MyGet Version NuGet Beta Version NuGet Version NuGet Badge

A popular .NET WebSocket Client

This new version is built on SuperSocket 2.0 and modern .NET (.NET Core). It includes breaking changes from the previous WebSocket4Net version, so code adjustments may be necessary for upgrading.

Usage 1: Read messages from event handler.


using WebSocket4Net;

var websocket = new WebSocket("https://localhost/live");

websocket.PackageHandler += (sender, package) =>
{
    Console.WriteLine(package.Message);
}

await websocket.OpenAsync();

websocket.StartReceive();

await websocket.SendAsync("Hello");

//...

await websocket.CloseAsync();

Usage 1: Read messages on demand.


using WebSocket4Net;

var websocket = new WebSocket("https://localhost/live");

await websocket.OpenAsync();

await websocket.SendAsync("Hello");

while (true)
{
    var package = await websocket.ReceiveAsync();

    if (package == null)
        break;

    Console.WriteLine(package.Message);
}

//...

await websocket.CloseAsync();

Showing the top 20 packages that depend on WebSocket4Net.

Packages Downloads
SocketIoClientDotNet
This is the Socket.IO Client Library for .NET.
29
EngineIoClientDotNet
This is the Engine.IO Client Library for C#.
25
SocketIoClientDotNet
This is the Socket.IO Client Library for C#.
24
EngineIoClientDotNet
This is the Engine.IO Client Library for C#.
21
SocketIoClientDotNet
This is the Socket.IO Client Library for C#.
20
EngineIoClientDotNet
This is the Engine.IO Client Library for C#.
20
SocketIoClientDotNet
This is the Socket.IO Client Library for .NET.
19
EngineIoClientDotNet
This is the Engine.IO Client Library for C#.
19
QuantConnect.ToolBox
QuantConnect LEAN Engine: ToolBox Project - A collection of data downloaders and converters
19
EngineIoClientDotNet
This is the Engine.IO Client Library for C#.
18
SocketIoClientDotNet
This is the Socket.IO Client Library for C#.
17
EngineIoClientDotNet
This is the Engine.IO Client Library for C#.
17
QuantConnect.Lean
Lean Engine is an open-source, plataform agnostic C# and Python algorithmic trading engine. Allows strategy research, backtesting and live trading with Equities, FX, CFD, Crypto, Options and Futures Markets.
17
QuantConnect.ToolBox
QuantConnect LEAN Engine: ToolBox Project - A collection of data downloaders and converters
17

.NET 5.0

.NET 6.0

.NET 7.0

.NET 7.0

.NET 7.0

.NET 7.0

.NET 7.0

.NET 8.0

.NET 8.0

.NET 8.0

.NET 8.0

.NET 8.0

.NET Standard 2.1

Version Downloads Last updated
1.0.0-beta.5 23 12/15/2025
1.0.0-beta.4 18 12/13/2025
1.0.0-beta.3 15 12/13/2025
1.0.0-beta.2 16 12/14/2025
1.0.0-beta.1 17 12/14/2025
0.15.2 19 12/13/2025
0.15.1 13 12/16/2025
0.15.0 13 12/21/2025
0.15.0-beta9 17 12/20/2025
0.15.0-beta8 17 12/20/2025
0.15.0-beta7 20 12/14/2025
0.15.0-beta6 18 12/20/2025
0.15.0-beta5 12 12/13/2025
0.15.0-beta4 18 12/13/2025
0.15.0-beta3 16 12/13/2025
0.15.0-beta2 12 12/20/2025
0.15.0-beta1 14 12/14/2025
0.14.1 20 12/15/2025
0.14.0 12 12/13/2025
0.13.1 15 12/09/2025
0.13.0 12 12/14/2025
0.12.0 14 12/11/2025
0.11.0 16 12/13/2025
0.10.0 16 12/13/2025
0.9.0 14 12/13/2025
0.8.0 17 12/13/2025
0.7.0 16 12/21/2025
0.5.1 16 12/21/2025
0.4.0 17 12/10/2025