{"id":13466537,"url":"https://github.com/BlazorExtensions/SignalR","last_synced_at":"2025-03-25T21:32:25.681Z","repository":{"id":33212059,"uuid":"134607625","full_name":"BlazorExtensions/SignalR","owner":"BlazorExtensions","description":"SignalR Core support for Microsoft ASP.NET Core Blazor","archived":false,"fork":false,"pushed_at":"2023-01-07T02:23:59.000Z","size":1299,"stargazers_count":217,"open_issues_count":23,"forks_count":48,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-01-17T09:12:09.475Z","etag":null,"topics":["blazor","blazor-extensions","blazor-interop","signalr","signalr-client","signalr-core","web-assembly","webassembly"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlazorExtensions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-23T18:02:09.000Z","updated_at":"2024-12-17T16:57:06.000Z","dependencies_parsed_at":"2023-01-14T23:56:00.946Z","dependency_job_id":null,"html_url":"https://github.com/BlazorExtensions/SignalR","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlazorExtensions%2FSignalR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlazorExtensions%2FSignalR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlazorExtensions%2FSignalR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlazorExtensions%2FSignalR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlazorExtensions","download_url":"https://codeload.github.com/BlazorExtensions/SignalR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245548480,"owners_count":20633589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blazor","blazor-extensions","blazor-interop","signalr","signalr-client","signalr-core","web-assembly","webassembly"],"created_at":"2024-07-31T15:00:45.780Z","updated_at":"2025-03-25T21:32:25.047Z","avatar_url":"https://github.com/BlazorExtensions.png","language":"C#","funding_links":[],"categories":["Libraries \u0026 Extensions"],"sub_categories":["Tools \u0026 Utilities"],"readme":"[![Build](https://github.com/BlazorExtensions/SignalR/workflows/CI/badge.svg)](https://github.com/BlazorExtensions/SignalR/actions)\r\n[![Package Version](https://img.shields.io/nuget/v/Blazor.Extensions.SignalR.svg)](https://www.nuget.org/packages/Blazor.Extensions.SignalR)\r\n[![NuGet Downloads](https://img.shields.io/nuget/dt/Blazor.Extensions.SignalR.svg)](https://www.nuget.org/packages/Blazor.Extensions.SignalR)\r\n[![License](https://img.shields.io/github/license/BlazorExtensions/SignalR.svg)](https://github.com/BlazorExtensions/SignalR/blob/master/LICENSE)\r\n\r\n\r\n\u003e **DEPRECATION NOTE**: This package is no longer required since [Blazor WebAssembly now supports SignalR Client](https://devblogs.microsoft.com/aspnet/blazor-webassembly-3-2-0-preview-1-release-now-available/). Users of this package should stop using it and use the official client instead.\r\n\r\n# Blazor Extensions\r\n\r\nBlazor Extensions is a set of packages with the goal of adding useful features to [Blazor](https://blazor.net).\r\n\r\n# Blazor Extensions SignalR\r\n\r\nThis package adds a [Microsoft ASP.NET Core SignalR](https://github.com/aspnet/SignalR) client library for [Microsoft ASP.NET Blazor](https://github.com/aspnet/Blazor).\r\n\r\nThe package aims to mimic the C# APIs of SignalR Client as much as possible and it is developed by wrapping the TypeScript client by using Blazor's interop capabilities. \r\n\r\nFor more information about SignalR development, please check [SignalR documentation](https://docs.microsoft.com/en-us/aspnet/core/signalr/introduction?view=aspnetcore-2.1).\r\n\r\n# Features\r\n\r\nThis package implements all public features of SignalR Typescript client.\r\n\r\n\u003e Note: The _Streaming_ APIs are not implemented yet. We will add it soon.\r\n\r\n# Sample usage\r\n\r\nThe following snippet shows how to setup the client to send and receive messages using SignalR.\r\n\r\nThe HubConnectionBuilder needs to get injected, which must be registered:\r\n```c#\r\n// in Startup.cs, ConfigureServices()\r\n   services.AddTransient\u003cHubConnectionBuilder\u003e();\r\n```\r\n```c#\r\n// in Component class\r\n[Inject]\r\nprivate HubConnectionBuilder _hubConnectionBuilder { get; set; }\r\n```\r\n```c#\r\n// in Component Initialization code\r\nvar connection = _hubConnectionBuilder // the injected one from above.\r\n        .WithUrl(\"/myHub\", // The hub URL. If the Hub is hosted on the server where the blazor is hosted, you can just use the relative path.\r\n        opt =\u003e\r\n        {\r\n            opt.LogLevel = SignalRLogLevel.Trace; // Client log level\r\n            opt.Transport = HttpTransportType.WebSockets; // Which transport you want to use for this connection\r\n        })\r\n        .Build(); // Build the HubConnection\r\n\r\nconnection.On(\"Receive\", this.Handle); // Subscribe to messages sent from the Hub to the \"Receive\" method by passing a handle (Func\u003cobject, Task\u003e) to process messages.\r\nawait connection.StartAsync(); // Start the connection.\r\n\r\nawait connection.InvokeAsync(\"ServerMethod\", param1, param2, paramX); // Invoke a method on the server called \"ServerMethod\" and pass parameters to it. \r\n\r\nvar result = await connection.InvokeAsync\u003cMyResult\u003e(\"ServerMethod\", param1, param2, paramX); // Invoke a method on the server called \"ServerMethod\", pass parameters to it and get the result back.\r\n```\r\n\r\n# Contributions and feedback\r\n\r\nPlease feel free to use the component, open issues, fix bugs or provide feedback.\r\n\r\n# Contributors\r\n\r\nThe following people are the maintainers of the Blazor Extensions projects:\r\n\r\n- [Attila Hajdrik](https://github.com/attilah)\r\n- [Gutemberg Ribiero](https://github.com/galvesribeiro)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBlazorExtensions%2FSignalR","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBlazorExtensions%2FSignalR","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBlazorExtensions%2FSignalR/lists"}