Soenneker.SignalR.Web.Client 4.0.814

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.SignalR.Web.Client --version 4.0.814
                    
NuGet\Install-Package Soenneker.SignalR.Web.Client -Version 4.0.814
                    
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="Soenneker.SignalR.Web.Client" Version="4.0.814" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.SignalR.Web.Client" Version="4.0.814" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.SignalR.Web.Client" />
                    
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 Soenneker.SignalR.Web.Client --version 4.0.814
                    
#r "nuget: Soenneker.SignalR.Web.Client, 4.0.814"
                    
#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 Soenneker.SignalR.Web.Client@4.0.814
                    
#: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=Soenneker.SignalR.Web.Client&version=4.0.814
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.SignalR.Web.Client&version=4.0.814
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

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 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 (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.822 0 9/13/2026
4.0.821 0 9/12/2026
4.0.820 8 9/12/2026
4.0.819 35 9/12/2026
4.0.815 279 9/8/2026
4.0.814 219 9/8/2026
4.0.813 228 9/7/2026
4.0.812 87 9/7/2026
4.0.811 330 9/3/2026
4.0.810 105 9/1/2026
4.0.809 138 8/31/2026
4.0.808 106 8/30/2026
4.0.807 90 8/30/2026
4.0.806 119 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 92 8/29/2026
4.0.801 86 8/29/2026
4.0.800 93 8/29/2026
Loading failed

Allow configuring SignalR negotiation HTTP handlers