Soenneker.SignalR.Web.Clients
4.0.1496
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.SignalR.Web.Clients --version 4.0.1496
NuGet\Install-Package Soenneker.SignalR.Web.Clients -Version 4.0.1496
<PackageReference Include="Soenneker.SignalR.Web.Clients" Version="4.0.1496" />
<PackageVersion Include="Soenneker.SignalR.Web.Clients" Version="4.0.1496" />
<PackageReference Include="Soenneker.SignalR.Web.Clients" />
paket add Soenneker.SignalR.Web.Clients --version 4.0.1496
#r "nuget: Soenneker.SignalR.Web.Clients, 4.0.1496"
#:package Soenneker.SignalR.Web.Clients@4.0.1496
#addin nuget:?package=Soenneker.SignalR.Web.Clients&version=4.0.1496
#tool nuget:?package=Soenneker.SignalR.Web.Clients&version=4.0.1496
Soenneker.SignalR.Web.Clients
A thread-safe, keyed collection of reusable SignalRWebClient instances with coordinated creation and disposal.
Installation
dotnet add package Soenneker.SignalR.Web.Clients
Registration
using Soenneker.SignalR.Web.Clients.Registrars;
builder.Services.AddSignalRWebClientsAsSingleton();
Use AddSignalRWebClientsAsSingleton when connections should live for the application lifetime. AddSignalRWebClientsAsScoped creates a separate keyed collection per dependency-injection scope and disposes its connections when that scope ends.
Creating and using a client
using Microsoft.AspNetCore.SignalR.Client;
using Soenneker.SignalR.Web.Client.Options;
using Soenneker.SignalR.Web.Clients.Abstract;
public sealed class UpdateSubscriber(ISignalRWebClients clients)
{
public async Task Start(CancellationToken cancellationToken)
{
var options = new SignalRWebClientOptions
{
HubUrl = "https://api.example.com/hubs/updates",
AccessTokenProvider = () => Task.FromResult(GetAccessToken())
};
var client = await clients.Get("updates", options, cancellationToken);
client.Connection.On<OrderUpdated>("OrderUpdated", Apply);
await client.StartConnection(cancellationToken);
}
}
The identifier defines the cache entry. Concurrent calls for the same identifier receive the same client. Options are used only when that identifier is first created; later calls return the existing instance rather than reconfiguring it. Always supply valid options when an identifier may not exist yet.
Get creates or retrieves a client but does not start its connection. Register hub handlers before calling StartConnection.
Removing clients
bool removed = await clients.Remove("updates");
Removing an identifier also disposes that client and its underlying SignalR connection. A later Get creates a new instance. Prefer the asynchronous Get and Remove methods because SignalR connection disposal is asynchronous; the synchronous variants block until asynchronous cleanup completes.
Disposing ISignalRWebClients disposes every cached client. Clients returned by the collection are owned by the collection and should not be disposed independently.
| Product | Versions 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. |
-
net10.0
- Soenneker.Dictionaries.Singletons (>= 4.0.102)
- Soenneker.SignalR.Web.Client (>= 4.0.822)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.SignalR.Web.Clients:
| Package | Downloads |
|---|---|
|
Soenneker.Flywheel.Dashboard
A real-time Blazor dashboard for monitoring and managing Soenneker Flywheel. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.1514 | 383 | 9/30/2026 |
| 4.0.1513 | 247 | 9/29/2026 |
| 4.0.1512 | 97 | 9/29/2026 |
| 4.0.1511 | 91 | 9/29/2026 |
| 4.0.1510 | 89 | 9/29/2026 |
| 4.0.1509 | 549 | 9/25/2026 |
| 4.0.1508 | 130 | 9/25/2026 |
| 4.0.1507 | 90 | 9/25/2026 |
| 4.0.1506 | 110 | 9/24/2026 |
| 4.0.1505 | 92 | 9/24/2026 |
| 4.0.1504 | 307 | 9/22/2026 |
| 4.0.1503 | 652 | 9/17/2026 |
| 4.0.1502 | 114 | 9/16/2026 |
| 4.0.1501 | 107 | 9/16/2026 |
| 4.0.1500 | 95 | 9/16/2026 |
| 4.0.1499 | 100 | 9/16/2026 |
| 4.0.1498 | 93 | 9/16/2026 |
| 4.0.1497 | 96 | 9/15/2026 |
| 4.0.1496 | 92 | 9/15/2026 |
| 4.0.1495 | 395 | 9/13/2026 |
Update dependency dotnet-sdk to v10.0.401 (#2031)