You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to remove a user (all their connections) from a Signalr group without requiring their client's interaction. (For instance: kicking a user from a party/room.)
I recognize that I have a couple tools at my disposal:
IHubContext.Groups.RemoveFromGroupAsync(string connectionId, string groupName)
and SignalR.Orleans.Core.HubContext.Group(groupName)
But neither the former nor the latter allow me to address a user by their user ID. How can I accomplish this?
One option I considered was getting all of a user's connection IDs, and iterating over RemoveFromGroupAsync, however the ConnectionGrain doesn't expose a method for getting the current connection IDs for a user/group.
The text was updated successfully, but these errors were encountered:
The same argument could be made for adding a user to a group from the backend. Right now, the only way to add a user to a group is to have their client send a request to the signalr hub. Ideally, I would be able to obtain a reference to the group and add the user by user ID.
I realize this is slightly outside the capability of Signalr, because Signalr assumes that a backplane doesn't know where on the cluster the user's connection is, but Orleans does know, so I think it's a reasonable extension for this particular backplane.
I'd like to remove a user (all their connections) from a Signalr group without requiring their client's interaction. (For instance: kicking a user from a party/room.)
I recognize that I have a couple tools at my disposal:
IHubContext.Groups.RemoveFromGroupAsync(string connectionId, string groupName)
and
SignalR.Orleans.Core.HubContext.Group(groupName)
But neither the former nor the latter allow me to address a user by their user ID. How can I accomplish this?
One option I considered was getting all of a user's connection IDs, and iterating over RemoveFromGroupAsync, however the ConnectionGrain doesn't expose a method for getting the current connection IDs for a user/group.
The text was updated successfully, but these errors were encountered: