TransportR.Client.SignalR 0.6.0

dotnet add package TransportR.Client.SignalR --version 0.6.0
                    
NuGet\Install-Package TransportR.Client.SignalR -Version 0.6.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="TransportR.Client.SignalR" Version="0.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TransportR.Client.SignalR" Version="0.6.0" />
                    
Directory.Packages.props
<PackageReference Include="TransportR.Client.SignalR" />
                    
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 TransportR.Client.SignalR --version 0.6.0
                    
#r "nuget: TransportR.Client.SignalR, 0.6.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 TransportR.Client.SignalR@0.6.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=TransportR.Client.SignalR&version=0.6.0
                    
Install as a Cake Addin
#tool nuget:?package=TransportR.Client.SignalR&version=0.6.0
                    
Install as a Cake Tool

TransportR - SignalR Client

The client of TransportR: streams typed records between .NET applications through a hub both sides connect out to.

Features

  • Efficient Streaming: Stream large datasets in batches, with opt-in backpressure at both ends to bound memory.
  • Resilience: Automatic reconnection and resumption from the receiver's last batch, checked by fault-injection scenarios (see the repository's scripts/README.md).
  • Serializer-agnostic: MessagePack, Protobuf, JSON, Apache Arrow, or your own IBatchSerializer<T>.
  • Built-in auth: OAuth2 client credentials. MessagePack serialization ships in its own package, TransportR.Serialization.MessagePack.

Installation

dotnet add package TransportR.Client.SignalR
dotnet add package TransportR.Serialization.MessagePack   # or another serializer package

Quick Start (Fluent API)

using TransportR.Client.SignalR;
using TransportR.Serialization.MessagePack;
using Microsoft.Extensions.Logging;

// 1. Configure the Client
var client = new TransportRClientBuilder<Order>()
    .WithUrl("http://localhost:5000")
    .WithClientCredentials(
        tokenEndpoint: "http://localhost:5100/connect/token",
        clientId: "my-client",
        clientSecret: "my-secret",
        scope: "transportr:group:senders"   // the client's groups come from these scopes
    )
    .WithMessagePackSerialization() // Use built-in MessagePack support
    // .WithSerializer(new MyCustomSerializer()) // Or bring your own
    .WithBatchSize(1000)
    .WithLoggerFactory(LoggerFactory.Create(b => b.AddConsole()))
    .Build();

// 2. Connect (with a token, groups passed here are ignored: the token's scopes decide)
await client.ConnectAsync();

// 3. Send Data
var receivers = await client.GetReceiversAsync();
await using var transfer = await client.InitTransferAsync(receivers[0].ClientId);
// ... send each item with transfer.SendAsync(item) ...
await transfer.CompleteAsync();

// 4. Dispose
await client.DisposeAsync();

Advanced Configuration

Authentication

You can provide a static token or a custom dynamic provider:

.WithAccessToken("ey...") 
// OR
.WithTokenProvider(async () => await GetMyTokenAsync())

Only a provider is renewed (see "Token Renewal" in SecurityArchitecture.md): the hub closes the connection of a client whose token it was not given a new one for, and a static token's client is closed when it expires. WithTokenRefreshThreshold sets how far ahead of the expiry the renewal starts.

A host that owns the rights of its clients (its own IClientIdentityProvider on the hub) and changes them while they run applies the change without waiting for a renewal:

await client.RefreshRegistrationAsync();

The client registers again under the same id, with the groups its identity holds now and a token from its provider, and returns once the hub has recorded both. Its connection and its transfers are not interrupted; the hub ends those the new groups no longer allow. It raises InvalidOperationException when the client is not connected, and the hub's refusal when the identity holds no group (the registration stays as it was). The hub must be of the same release.

Serialization

MessagePack is the recommended default: on par with Protobuf in our benchmark, and it takes any POCO without attributes or schema. Protobuf needs annotated contracts and produces the most compact payload; JSON can be sent uncompressed for debugging (WithJsonSerialization(compress: false)). Both ends of a transfer must use the same serializer and settings: a batch the receiver cannot decode fails the transfer. Any other format is an IBatchSerializer<T> away.

The builder carries the item type, so a serializer that cannot carry it is not an overload that exists: new TransportRClientBuilder<string>().WithArrowSerialization() does not compile, rather than building a client that fails on its first batch.

License

MIT

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 (4)

Showing the top 4 NuGet packages that depend on TransportR.Client.SignalR:

Package Downloads
TransportR.Serialization.MessagePack

MessagePack + LZ4 batch serializer for TransportR: any POCO, no schema needed

TransportR.Serialization.Arrow

Apache Arrow RecordBatch serializer for TransportR (Arrow IPC, LZ4)

TransportR.Serialization.Protobuf

Protobuf-net + Zstd batch serializer for TransportR: annotated contracts, the most compact payload

TransportR.Serialization.Json

System.Text.Json batch serializer for TransportR, Zstd-compressed or plain JSON for debugging

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.6.0 173 10/16/2026
0.5.1 123 10/12/2026
0.5.0 116 10/12/2026
0.4.0 124 10/10/2026
0.3.1 156 10/2/2026
0.3.0 125 10/2/2026
0.2.0 139 9/30/2026
0.1.0 135 9/27/2026