Skip to content

Packages

SignalARRR is distributed as multiple NuGet packages and one npm package. Choose the packages that match your project's role.

.NET Packages

PackageTargetPurpose
Cocoar.SignalARRR.Contractsnet10.0[SignalARRRContract] attribute + Roslyn source generator. Reference from shared interface projects.
Cocoar.SignalARRR.Servernet10.0Server-side: HARRR hub, ServerMethods<T>, authorization, ClientManager, streaming.
Cocoar.SignalARRR.Clientnet10.0Client-side: HARRRConnection, typed proxies, server-to-client handlers.
Cocoar.SignalARRR.DynamicProxynet10.0Optional runtime proxy fallback via DispatchProxy. For plugin/dynamic scenarios. Not AOT-compatible.

Internal packages

These packages are referenced transitively — you normally don't need to reference them directly:

PackagePurpose
Cocoar.SignalARRR.CommonShared types, wire protocol constants, message models
Cocoar.SignalARRR.ProxyGeneratorBase classes for proxy creation (ProxyCreator, ProxyCreatorHelper)
Cocoar.SignalARRR.SourceGeneratorRoslyn incremental source generator (bundled in Contracts)

npm Package

PackageVersionPurpose
@cocoar/signalarrr4.0.0TypeScript/JavaScript client: HARRRConnection, invoke, send, stream, onServerMethod

Peer dependency

The npm package requires @microsoft/signalr ^10.0.0:

bash
npm install @cocoar/signalarrr @microsoft/signalr

Swift Package

PackagePurpose
CocoarSignalARRRCore Swift client: HARRRConnection, invoke, send, stream, onServerMethod, stream references
CocoarSignalARRRMacros@HubProxy macro for compile-time proxy generation from Swift protocols

Dependencies

  • signalr-client-swift (1.0.0-preview.1+) — Microsoft's SignalR Swift client
  • swift-syntax (510.0.0+) — for macro code generation

Swift Package Manager

swift
dependencies: [
    .package(url: "https://github.com/cocoar-dev/Cocoar.SignalARRR.git", from: "4.0.0"),
],
targets: [
    .target(
        name: "MyApp",
        dependencies: [
            .product(name: "CocoarSignalARRR", package: "Cocoar.SignalARRR"),
            .product(name: "CocoarSignalARRRMacros", package: "Cocoar.SignalARRR"),
        ]
    ),
]

Platforms: iOS 14+, macOS 11+, tvOS 14+, watchOS 7+

Typical project setup

Shared interfaces (class library)

xml
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Cocoar.SignalARRR.Contracts" Version="4.*" />
  </ItemGroup>
</Project>

Server (ASP.NET Core)

xml
<ItemGroup>
  <PackageReference Include="Cocoar.SignalARRR.Server" Version="4.*" />
  <ProjectReference Include="..\Shared\Shared.csproj" />
</ItemGroup>

.NET Client (Console / WPF / etc.)

xml
<ItemGroup>
  <PackageReference Include="Cocoar.SignalARRR.Client" Version="4.*" />
  <ProjectReference Include="..\Shared\Shared.csproj" />
</ItemGroup>

TypeScript Client

json
{
  "dependencies": {
    "@cocoar/signalarrr": "^4.0.0",
    "@microsoft/signalr": "^10.0.0"
  }
}

Dependency graph

Next steps

Released under the Apache-2.0 License.