![]() |
VOOZH | about |
dotnet add package WatsonWebsocket --version 4.1.8
NuGet\Install-Package WatsonWebsocket -Version 4.1.8
<PackageReference Include="WatsonWebsocket" Version="4.1.8" />
<PackageVersion Include="WatsonWebsocket" Version="4.1.8" />Directory.Packages.props
<PackageReference Include="WatsonWebsocket" />Project file
paket add WatsonWebsocket --version 4.1.8
#r "nuget: WatsonWebsocket, 4.1.8"
#:package WatsonWebsocket@4.1.8
#addin nuget:?package=WatsonWebsocket&version=4.1.8Install as a Cake Addin
#tool nuget:?package=WatsonWebsocket&version=4.1.8Install as a Cake Tool
WatsonWebsocket is the EASIEST and FASTEST way to build client and server applications that rely on messaging using websockets. It's. Really. Easy.
Many thanks and much appreciation to those that take the time to make this library better!
@BryanCrotaz @FodderMK @caozero @Danatobob @Data33 @AK5nowman @jjxtra @MartyIX @rajeshdua123 @tersers @MacKey-255 @KRookoo1 @joreg @ilsnk @xbarra @mawkish00 @jlopvet @marco-manfroni-perugiatiming @GiaNTizmO @exergist @ebarale99 @WarstekHUN @Rubidium37 @codengine @berkut0
A test project for both client (TestClient) and server (TestServer) are included which will help you understand and exercise the class library.
A test project that spawns a server and client and exchanges messages can be found here: https://github.com/jchristn/watsonwebsockettest
WatsonWebsocket currently relies on websocket support being present in the underlying operating system. Windows 7 does not support websockets.
SSL is supported in WatsonWebsocket. The constructors for WatsonWsServer and WatsonWsClient accept a bool indicating whether or not SSL should be enabled. Since websockets, and as a byproduct WatsonWebsocket, use HTTPS, they rely on certificates within the certificate store of your operating system. A test certificate is provided in both the TestClient and TestServer projects which can be used for testing purposes. These should NOT be used in production.
For more information on using SSL certificates, please refer to the wiki.
Guid in ClientMetadataListClients now returns full ClientMetadataSend* methods now take guid as opposed to IpPortusing WatsonWebsocket;
WatsonWsServer server = new WatsonWsServer("[ip]", port, true|false);
server.ClientConnected += ClientConnected;
server.ClientDisconnected += ClientDisconnected;
server.MessageReceived += MessageReceived;
server.Start();
static void ClientConnected(object sender, ConnectionEventArgs args)
{
Console.WriteLine("Client connected: " + args.Client.ToString());
}
static void ClientDisconnected(object sender, DisconnectionEventArgs args)
{
Console.WriteLine("Client disconnected: " + args.Client.ToString());
}
static void MessageReceived(object sender, MessageReceivedEventArgs args)
{
Console.WriteLine("Message received from " + args.Client.ToString() + ": " + Encoding.UTF8.GetString(args.Data));
}
using WatsonWebsocket;
WatsonWsClient client = new WatsonWsClient("[server ip]", [server port], true|false);
client.ServerConnected += ServerConnected;
client.ServerDisconnected += ServerDisconnected;
client.MessageReceived += MessageReceived;
client.Start();
static void MessageReceived(object sender, MessageReceivedEventArgs args)
{
Console.WriteLine("Message from server: " + Encoding.UTF8.GetString(args.Data));
}
static void ServerConnected(object sender, EventArgs args)
{
Console.WriteLine("Server connected");
}
static void ServerDisconnected(object sender, EventArgs args)
{
Console.WriteLine("Server disconnected");
}
server = new WatsonWsServer("http://localhost:9000/");
server.Start();
let socket = new WebSocket("ws://localhost:9000/test/");
socket.onopen = function () { console.log("success"); };
socket.onmessage = function (msg) { console.log(msg.data); };
socket.onclose = function () { console.log("closed"); };
// wait a moment
socket.send("Hello, world!");
When you configure WatsonWebsocket to listen on 127.0.0.1 or localhost, it will only respond to requests received from within the local machine.
To configure access from other nodes outside of localhost, use the following:
* or +. You MUST:
127.0.0.1, you MAY need to run as administrator (this is operating system dependent)netsh command:
netsh http show urlaclnetsh http add urlacl url=http://[hostname]:[port]/ user=everyone listen=yeshostname and port are the values you are using in the constructorPlease refer to CHANGELOG.md for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net461 net461 was computed. net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 is compatible. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on WatsonWebsocket:
| Package | Downloads |
|---|---|
|
BigQ.Client
BigQ is a messaging platform using TCP sockets and websockets featuring sync, async, channel, and private communications. This package includes the BigQ client and associated libraries. |
|
|
BigQ.Server
BigQ is a messaging platform using TCP sockets and websockets featuring sync, async, channel, and private communications. This package includes the BigQ server and associated libraries. |
|
|
BigQ.dll
BigQ is a messaging platform using TCP sockets and websockets featuring sync, async, channel, and private communications. |
|
|
View.Models
Database models, services, and supporting classes for for View AI. |
|
|
VL.IO.WebSocket
Websocket client and server for vvvv |
Showing the top 6 popular GitHub repositories that depend on WatsonWebsocket:
| Repository | Stars |
|---|---|
|
visualHFT/VisualHFT
VisualHFT is a WPF/C# desktop GUI that shows market microstructure in real time. You can track advanced limit‑order‑book dynamics and execution quality, then use its modular plugins to shape the analysis to your workflow.
|
|
|
nulastudio/NetBeauty2
Move a .NET Framework/.NET Core app runtime components and dependencies into a sub-directory and make it beauty.
|
|
|
ME3Tweaks/ME3TweaksModManager
Mod Manager for Mass Effect Original Trilogy and Mass Effect Legendary Edition
|
|
|
codengine/SOTFEdit
A Sons of The Forest Savegame Editor
|
|
|
elgarf/vMixUTC
Customizable controller for vMix
|
|
|
ChrisFeline/ToNSaveManager
Save tool and manager for VRChat world: Terrors of Nowhere
|
| Version | Downloads | Last Updated |
|---|---|---|
| 4.1.8 | 8,967 | 2/3/2026 |
| 4.1.7 | 9,907 | 10/15/2025 |
| 4.1.6 | 2,711 | 9/11/2025 |
| 4.1.5 | 2,769 | 8/3/2025 |
| 4.1.4 | 16,124 | 4/1/2025 |
| 4.1.3 | 2,650 | 2/17/2025 |
| 4.1.2 | 52,696 | 5/1/2024 |
| 4.1.1 | 6,689 | 3/10/2024 |
| 4.1.0 | 343 | 3/7/2024 |
| 4.0.11 | 56,434 | 6/28/2023 |
| 4.0.10 | 10,670 | 5/23/2023 |
| 4.0.9 | 1,308 | 5/10/2023 |
| 4.0.8 | 5,123 | 2/24/2023 |
| 4.0.6 | 4,813 | 1/31/2023 |
| 4.0.4 | 9,407 | 1/2/2023 |
| 4.0.3 | 675 | 12/16/2022 |
| 4.0.2 | 511 | 12/16/2022 |
| 4.0.1 | 2,338 | 11/22/2022 |
| 3.0.2 | 11,312 | 10/24/2022 |
| 3.0.1 | 13,703 | 8/8/2022 |
Retarget to include net8.0.