C#C
C#11mo ago
Stilau

✅ Groups & Clients in SignalR not taking requests.

I have 2 Hub tasks,
  1. Connect
  2. Send
I save all connections that are being sent to connect with a game code, and store them in a group..
Like this:
public async Task Connect(string gameId)
{
    await Groups.AddToGroupAsync(Context.ConnectionId, gameId)
}

public async Task Send(string gameId)
{
    await Clients.Group(gameId).SendAsync("Testing");
}


I tried doing this, but it simply won't work?
I also tried storing away a client connection ID and not go through groups, but I am not able to send any requests down to my Javascript part?

It works if I use Clients.All.SendAsync(), but nothing else..?
Was this page helpful?