tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
IConnectionMappedHubContext.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Threading;
4using System.Threading.Tasks;
5
6using Microsoft.AspNetCore.SignalR;
7
10
12{
18 interface IConnectionMappedHubContext<THub, THubMethods> : IHubContext<THub, THubMethods>
19 where THub : Hub<THubMethods>
20 where THubMethods : class
21 {
30 event Func<IAuthenticationContext, Func<IEnumerable<string>, Task>, CancellationToken, ValueTask> OnConnectionMapGroups;
31
37 List<string> UserConnectionIds(User user);
38
44 }
45}
A IHubContext<THub> that maps Users to their connection IDs.
Func< IAuthenticationContext, Func< IEnumerable< string >, Task >, CancellationToken, ValueTask > OnConnectionMapGroups
Called when a user connects. Parameters:
List< string > UserConnectionIds(User user)
Gets a List<T> of current connection IDs for a given user .
void AbortUnauthedConnections(User user)
Aborts the connections associated with the given user .