anthonypliu
anthonypliu

Reputation: 12437

Can a connectionId be a part of multiple groups in hub class

Can I call Groups.Add on the same connectionid but for 2 different groups and if i broadcast a certain message to either group the connectionid added will get both messages?

Upvotes: 0

Views: 112

Answers (1)

Drew Marsh
Drew Marsh

Reputation: 33379

Yes. This is exactly what JabbR, the flagship test application for SignalR, does. It uses groups to represent "rooms" and, in JabbR, a user can be in N rooms. You can see the exact details of that implementation here.

Upvotes: 3

Related Questions