User61956409 posted
Hi Taras,
Both approaches that you mentioned can be used to send messages to specified subsets of connected clients. Let’s consider these specifical scenarios:
If you’d like to send messages to too many connected clients, using Clients.Users(userIds), you need to pass all client Ids to that method manually. for this scenario, using Clients.Group(groupName) would be more easy and convenient.
On the other hand, if you send messages to users in a specified group except the specified clients, and these specified clients (you do not want them see messages) are also too many, in this scenario, using Clients.Group(groupName, excludeConnectionIds)
maybe not more convenient than using Clients.Users(userIds).
Briefly, using Clients.Users(userIds) or Clients.Group(groupName) depend on your specified scenarios, and both of these two methods can help you send messages to specified subsets of connected clients.
With Regards,
Fei Han