ReactiveSignalR provides reactive programming for ASP.NET Core SignalR client application (NOT supports ASP.NET SignalR).
- Provides
HubConnection.On
method asIObservable
- Provides
HubConnection
event asIObservable
//--- Create connection
var url = "http://localhost:5000/chathub";
var connection = new HubConnectionBuilder().WithUrl(url).Build();
//--- Fluently coding using Rx
var subscription
= connection
.On<string>("Receive") // ReactiveSignalR provides this line
.Subscribe(message => /* do something */);
//--- Unsubscribe
subscription.Dispose();
Getting started from downloading NuGet package.
PM> Install-Package ReactiveSignalR
This library is provided under MIT License.
Takaaki Suzuki (a.k.a @xin9le) is software developer in Japan who awarded Microsoft MVP for Developer Technologies (C#) since July 2012.