public void AddTopic(List <string> topics, string serverName) { foreach (var topic in topics) { SignalrDataStore.AddUser(new Core.SignalBus.Model.UserSubscription { ConnectionId = Context.ConnectionId, Topic = topic, TopicTime = DateTime.Now, FromServerName = serverName, IpAddress = CommonHelper.GetClientIpAddress() }); } }
public void DelTopic(string topic) { SignalrDataStore.RemoveTopic(Context.ConnectionId, topic); }
public override async Task OnDisconnectedAsync(Exception exception) { await SignalrDataStore.RemoveConnection(Context.ConnectionId); await base.OnDisconnectedAsync(exception); }