...

/

Working with Client Groups

Working with Client Groups

Working with client groups using signalR Groups.

Overview

SignalR Hub has the Groups property, which allows us to add clients to a group and remove clients from it. Each group is a one-to-many relationship between an arbitrary group name and a collection of connection IDs. Clients property of the Hub base class has the Group method, which allows us to specify a group name and send a message to all clients in the group.

Groups are helpful in many scenarios. We can use them to assign all clients of a specific category to a group. Alternatively, we can just associate a group with a specific ...