Soenneker.SignalR.Web.Client
4.0.815
Prefix Reserved
dotnet add package Soenneker.SignalR.Web.Client --version 4.0.815
NuGet\Install-Package Soenneker.SignalR.Web.Client -Version 4.0.815
<PackageReference Include="Soenneker.SignalR.Web.Client" Version="4.0.815" />
<PackageVersion Include="Soenneker.SignalR.Web.Client" Version="4.0.815" />
<PackageReference Include="Soenneker.SignalR.Web.Client" />
paket add Soenneker.SignalR.Web.Client --version 4.0.815
#r "nuget: Soenneker.SignalR.Web.Client, 4.0.815"
#:package Soenneker.SignalR.Web.Client@4.0.815
#addin nuget:?package=Soenneker.SignalR.Web.Client&version=4.0.815
#tool nuget:?package=Soenneker.SignalR.Web.Client&version=4.0.815
Soenneker.SignalR.Web.Client
A SignalR client wrapper that retries initial connections, recovers closed connections, and exposes callbacks for restoring application state after a connection returns.
Installation
dotnet add package Soenneker.SignalR.Web.Client
Usage
using Soenneker.SignalR.Web.Client;
using Soenneker.SignalR.Web.Client.Options;
var options = new SignalRWebClientOptions
{
HubUrl = "https://api.example.com/hubs/updates",
AccessTokenProvider = () => Task.FromResult(accessToken),
ConnectionRestored = async context =>
{
// Reload authoritative state after the initial connection or a reconnect.
await SynchronizeAsync(context.IsReconnect);
},
RetriesExhausted = () => NotifyConnectionFailure()
};
await using var client = new SignalRWebClient(options);
client.Connection.On<OrderUpdated>("OrderUpdated", update =>
{
Apply(update);
});
await client.StartConnection(cancellationToken);
await client.Connection.InvokeAsync("Subscribe", accountId, cancellationToken);
The wrapper owns its HubConnection; dispose the wrapper when the connection is no longer needed. Use Connection to register handlers with On(...) and call hub methods with InvokeAsync(...).
Reconnection behavior
Each connection cycle retries a failed start up to MaxRetryAttempts times using exponential backoff. RetryDelayProvider can replace that schedule. Automatic reconnect uses the same policy. After an exhausted cycle, ReconnectIndefinitely continues recovery in the background after InitialRetryDelay; set it to false to stop. ConnectionRestored runs after both an initial connection and successful recovery; callback failures are logged without stopping transport recovery.
SignalR transport negotiation is enabled by default so WebSockets can fall back when a proxy or mobile network blocks them. Set TransportType only when a specific transport is required. ServerTimeout and KeepAliveInterval can be overridden when the server uses matching connection settings.
Enable StatefulReconnect only when the server supports it. StatefulReconnectBufferSize controls the client-side buffered message bytes used by that mode.
Call StopConnection for an intentional disconnect. This suppresses closed-connection recovery until StartConnection is called again.
Authentication and headers
AccessTokenProvider is evaluated by SignalR when it needs a bearer token. Static request headers can be supplied through Headers; avoid placing secrets in headers that may be sent by transports or intermediaries you do not control.
| 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
- Microsoft.AspNetCore.SignalR.Client (>= 10.0.12)
- Soenneker.Asyncs.Locks (>= 4.0.79)
- Soenneker.Atomics.ValueBools (>= 4.0.38)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Soenneker.SignalR.Web.Client:
| Package | Downloads |
|---|---|
|
Soenneker.SignalR.Web.Clients
Providing async thread-safe resilient and dependable SignalR web client singletons |
|
|
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.815 | 157 | 9/8/2026 |
| 4.0.814 | 199 | 9/8/2026 |
| 4.0.813 | 210 | 9/7/2026 |
| 4.0.812 | 84 | 9/7/2026 |
| 4.0.811 | 326 | 9/3/2026 |
| 4.0.810 | 105 | 9/1/2026 |
| 4.0.809 | 137 | 8/31/2026 |
| 4.0.808 | 106 | 8/30/2026 |
| 4.0.807 | 90 | 8/30/2026 |
| 4.0.806 | 118 | 8/30/2026 |
| 4.0.805 | 112 | 8/30/2026 |
| 4.0.804 | 99 | 8/30/2026 |
| 4.0.803 | 108 | 8/30/2026 |
| 4.0.802 | 90 | 8/29/2026 |
| 4.0.801 | 86 | 8/29/2026 |
| 4.0.800 | 93 | 8/29/2026 |
| 4.0.799 | 90 | 8/29/2026 |
| 4.0.798 | 176 | 8/26/2026 |
| 4.0.797 | 405 | 8/12/2026 |
| 4.0.796 | 116 | 8/11/2026 |
Updated Multiple NuGet packages