tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
IHubConnectionMapper.cs
Go to the documentation of this file.
1using System.Threading;
2using System.Threading.Tasks;
3
4using Microsoft.AspNetCore.SignalR;
5
8
10{
16 interface IHubConnectionMapper<THub, THubMethods>
17 where THub : ConnectionMappingHub<THub, THubMethods>
18 where THubMethods : class
19 {
27 ValueTask UserConnected(IAuthenticationContext authenticationContext, THub hub, CancellationToken cancellationToken);
28
33 void UserDisconnected(string connectionId);
34 }
35}
Base class for Hub<T>s that want to map their connection IDs to Models.PermissionSets.
For creating and accessing authentication contexts.
Handles mapping connection IDs to Users for a given THub .
ValueTask UserConnected(IAuthenticationContext authenticationContext, THub hub, CancellationToken cancellationToken)
To be called when a hub connection is made.
void UserDisconnected(string connectionId)
To be called when a hub connection is terminated.