asp.net - SignalR - Leave All Groups -
A signal R Hub can be linked to the group using the client or removed. A customer may belong to multiple groups Is it currently possible to remove a customer from each group related? I think what I see is It seems that they have not implemented it yet , But it is considered a candidate for v3. Request a feature with the following code: something like the customer [* allgroups *]. Leave (context.ConnectionId)
Public Fixed Class SignalRConnectionToGroupsMap {private static readonly ConcurrentDictionary & lt; String, list & lt; String & gt; & Gt; Map = new concurrent extension & lt; String, list & lt; String & gt; & Gt; (); Public Stable Bull TryAddGroup (string connection id, string group name) {list & lt; String & gt; group; If (map! Triage value (connection etc., out group)) {return map. TryID (connection IDE, new list & lt; string & gt; () {groupName}); } If (Group! Canton (groupname)) {groups.Add (groupName); } Back true; } // Since this case of use we would only like to get a list of group names when we remove the mapping - we can remove the mapping, while we list the list of public static bund trimov (string connection id, out) & Lt; string & gt; results) {Return Map.TryRemove (connectionId, Out of Results); }}
Comments
Post a Comment