mirror of
https://github.com/chsakell/aspnet-core-signalr-angular.git
synced 2025-12-22 17:27:48 +00:00
add hub server methods
This commit is contained in:
@@ -13,5 +13,15 @@ namespace LiveGameFeed.Hubs
|
||||
{
|
||||
return Clients.All.messageReceived(Context.ConnectionId + "> " + message);
|
||||
}
|
||||
|
||||
public Task Subscribe(int matchId)
|
||||
{
|
||||
return Groups.Add(Context.ConnectionId, matchId.ToString());
|
||||
}
|
||||
|
||||
public Task Unsubscribe(int matchId)
|
||||
{
|
||||
return Groups.Remove(Context.ConnectionId, matchId.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user