WebSocket.Rx 0.1.0

This package has a SemVer 2.0.0 package version: 0.1.0+0.
There is a newer version of this package available.
See the version list below for details.
dotnet add package WebSocket.Rx --version 0.1.0
                    
NuGet\Install-Package WebSocket.Rx -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WebSocket.Rx" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WebSocket.Rx" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="WebSocket.Rx" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add WebSocket.Rx --version 0.1.0
                    
#r "nuget: WebSocket.Rx, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package WebSocket.Rx@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=WebSocket.Rx&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=WebSocket.Rx&version=0.1.0
                    
Install as a Cake Tool

WebSocket.Rx

WebSocket.Rx is a powerful .NET NuGet package for reactive WebSocket communication using Reactive Extensions (Rx.NET).

NuGet Build Status License Downloads

<img alt="WebSocket.Rx logo" height="128" src="https://raw.githubusercontent.com/st0o0/WebSocket.Rx/refs/heads/main/docs/logo/logo.png" width="128"/>

Installation

dotnet add package WebSocket.Rx

Requires: System.Reactive and a WebSocket implementation like Websocket.Client.

Features

  • Reactive Streams: Observable sequences for MessageReceived, ReconnectionHappened, StateChanged
  • Automatic Reconnecting: Configurable with backoff strategy
  • Thread-Safe Processing: ObserveOn for UI or scheduler integration
  • Send Queue: Asynchronous messaging with automatic buffering

Usage

using WebSocket.Rx;
using System.Reactive.Linq;

var client = new WebSocketRxClient("wss://echo.websocket.org")
{
    ReconnectTimeout = TimeSpan.FromSeconds(5)
};

client.MessageReceived
    .Where(msg => msg.Text.Contains("ping"))
    .Subscribe(msg => client.Send("pong"));

client.StateChanged.Where(state => state == WebSocketState.Open)
    .Subscribe(_ => client.Send("Connected!"));

await client.ConnectAsync();

Configuration

var options = new WebSocketRxOptions
{
    LoggerFactory = LoggerFactory.Create(builder => builder.AddConsole()),
    AutomaticReconnect = true,
    ReconnectTimeout = TimeSpan.FromSeconds(3)
};

Contributing

Contributions are welcome! This library grows with the community's needs.

How to Contribute

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Write tests for your changes
  4. Ensure all tests pass: dotnet test
  5. Submit a Pull Request

Contribution Guidelines

  • Follow existing code style and conventions
  • Include unit tests for new features
  • Update documentation for API changes
  • Keep changes focused and atomic

License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❤️ for the .NET

For questions, support, or feature requests, please open an issue.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on WebSocket.Rx:

Package Downloads
Signal.Bot

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.8 106 2/20/2026
0.1.7 51 2/17/2026
0.1.6 220 2/13/2026
0.1.5 122 2/9/2026
0.1.4 110 2/7/2026
0.1.3 37 2/6/2026
0.1.2 42 2/6/2026
0.1.1 33 2/6/2026
0.1.0 39 2/3/2026

🎯 WebSocket.Rx v0.1.0

📦 NuGet: https://nuget.org/packages/WebSocket.Rx
🔗 Release: https://github.com/st0o0/WebSocket.Rx/releases/v0.1.0

See release page for full changelog and details!

Built with ❤️