Azure / azure-signalr

Azure SignalR Service SDK for .NET

Home Page:https://aka.ms/signalr-service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to add a strongly typed SignalR Hub when using Mangament

ZisisTsatsas opened this issue · comments

Can I add a strongly typed SignalR Hub when using Management on a serverless configuration?

I want to add a strongly typed hub in my signalr service to be used by the client, is this possible when using Management and ServiceHubContext?

If not how can invoke methods from clients? Send messages between clients or have clients add themselves to groups for example.

commented

Although strongly typed hub is supported, client invocation is not supported yet. Duplicated: #1756

is there plans for it to be supported?

commented

is there plans for it to be supported?

Yes

commented

@ZisisTsatsas Sorry that I have found that I may misunderstand your problem. What you want to do in Call hub methods from clients, right? It's not convenient to achieve it only with Management SDK. We recommend you use Azure Functions with SignalR trigger.

Please note that Strongly typed hubs in SignalR is more of the data flow from server to client.

Feel free to ask more questions.

@Y-Sindo Is there a way to do this without Azure Functions? Currently, I am hosting SignalR alongside my API in an Azure WebApp and I am using Redis Stack to have consistency over different regions, but it has some issues so I want to switch to the Azure SignalR service

commented

Yes, you can do this without Azure Functions. SignalR trigger is nothing more than a REST API server that handles client events. Therefore, you can also implement a REST API server to do this: