AVCoders.SignalR.Connections
2026.11.1
Prefix Reserved
dotnet add package AVCoders.SignalR.Connections --version 2026.11.1
NuGet\Install-Package AVCoders.SignalR.Connections -Version 2026.11.1
<PackageReference Include="AVCoders.SignalR.Connections" Version="2026.11.1" />
<PackageVersion Include="AVCoders.SignalR.Connections" Version="2026.11.1" />
<PackageReference Include="AVCoders.SignalR.Connections" />
paket add AVCoders.SignalR.Connections --version 2026.11.1
#r "nuget: AVCoders.SignalR.Connections, 2026.11.1"
#:package AVCoders.SignalR.Connections@2026.11.1
#addin nuget:?package=AVCoders.SignalR.Connections&version=2026.11.1
#tool nuget:?package=AVCoders.SignalR.Connections&version=2026.11.1
AVCoders.SignalR.Connections
Connection tracking and unknown-group reporting shared by the AV Coders SignalR hubs. Part of the AV Coders device library. Targets .NET 8.0 and .NET 10.0.
Install
dotnet add package AVCoders.SignalR.Connections
The AVCoders.SignalR.* hub packages depend on it, so a program that uses one of them already has it.
What's inside
HubConnections: one per hub, aLogBasenamed after the hub. It holds the open connections, the groups each one has joined, the registered groups and the recent unknown-group requests.GroupHub<T>: the base of every library hub. It opens a connection inHubConnectionson connect and closes it on disconnect.AddToGroup(group)joins the SignalR group and counts the connection in it.ReportUnknownGroup(group)reports a request for a group nothing is registered for, under the calling method's name.HubConnectionsSnapshot,GroupConnectionsandUnknownGroupRequest: the state for a health page.
Reading connections
Every library hub exposes its tracker as a static Connections: SourceHub.Connections, VolumeHub.Connections, RoomHub.Connections, DestinationHub.Connections, DisplayHub.Connections, CameraHub.Connections and SetTopBoxHub.Connections.
var openPages = RoomHub.Connections.Count("L1-01");
RoomHub.Connections.Changed += (_, _) => UpdateControlSurfaces();
var health = RoomHub.Connections.GetSnapshot();
Count(group)is the number of open connections that have joined the group.Changedis a plainEventHandler. It fires after every open, join, close, registration and unknown-group request, on the SignalR thread that made the change, so two changes can arrive out of order: a handler readsCount(group)orGetSnapshot()for the current state. A handler that throws is logged and the rest still run.GetSnapshot()gives the hub name,OpenConnections(every open connection, joined or not),Groups(every registered group, plus any group a connection joined that has nothing registered, in ordinal order, each withRegisteredand itsConnections) andUnknownGroupRequests(the last 50, oldest first, each with when, the hub, the method, the connection id and the group exactly as received).- Every
HubConnectionsis inLogBaseRegistry, soLogBaseRegistry.GetAll().OfType<HubConnections>()lists every hub's tracker.
A connection counts in a group from JoinGroup until it disconnects. A connection can join several groups. A room page that opens the Source, Volume and Room hubs is three connections, one on each hub. A JoinGroup that finishes after its connection has closed (SignalR can run OnDisconnectedAsync while a call is still in flight) isn't counted.
Unknown groups
When JoinGroup or a command names a group nothing is registered for, the caller sees what it always has: JoinGroup still adds the connection to the SignalR group and sends no state, commands are dropped, SetTopBoxHub.GetState returns null, and no call fails. The hub also reports it:
- It is logged at Warning with the method, the connection id, the hub, the group and the registered groups.
SetTopBoxHubalso keeps its own "{Method} ignored: no set-top box registered for group {Group}" warning. - While the asking connection is open, the hub raises an ongoing Major issue under the key
unknown-group:<group>: "{Method} from connection {id} asked for group '{group}', which has nothing registered. Registered groups: {groups}". The registry carries it to health pages and the management interface's Issues page. It resolves when every open connection that asked for the group has closed, or when the group is registered. A request from a connection that has already closed is logged and recorded but raises no issue. - The request is added to the snapshot's
UnknownGroupRequests, and a connection that joined the group counts in it withRegisteredfalse.
A program's own hub
A hub in a program can use the same tracking:
public class KeypadHub() : GroupHub<IKeypadHub>(Connections)
{
public static HubConnections Connections { get; } = new(nameof(KeypadHub));
public override async Task OnConnectedAsync()
{
await base.OnConnectedAsync();
await AddToGroup(RoomFromPath());
}
}
Register the groups it serves with Connections.Register(group) and call ReportUnknownGroup(group) for any other.
Logging
The tracker's own lines (the unknown-group warning, and opens, joins, closes and registrations at Debug) go through a logger resolved from LogBase.LoggerFactory at each call, like the hubs' own lines. Two kinds of line go through the LogBase logger, which HubConnections takes when it is created, the first time the hub type is used: the issue's own Warning line and a Changed handler's exception. Set LogBase.LoggerFactory before mapping the hubs or registering managers so those reach the log too.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- AVCoders.Core (>= 2026.11.1)
-
net8.0
- AVCoders.Core (>= 2026.11.1)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on AVCoders.SignalR.Connections:
| Package | Downloads |
|---|---|
|
AVCoders.SignalR.Source
SignalR hub and source definitions for AV routing UIs, including name, icon, connected state and preview URL. |
|
|
AVCoders.SignalR.Camera
SignalR hub and bridge for AV Coders cameras: power, preset recall and tracking mode broadcast to connected UIs. |
|
|
AVCoders.SignalR.Display
SignalR hub and bridge for AV Coders displays: power, input, volume and mute broadcast to connected UIs. |
|
|
AVCoders.SignalR.Volume
SignalR hub and bridge for AV Coders volume controls: indexed level and mute state broadcast to connected UIs. |
|
|
AVCoders.SignalR.Destination
SignalR hub and destination definitions for AV routing UIs, including the routed source and video mute state. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.11.1 | 0 | 11/12/2026 |