Пример #1
0
 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()
         });
     }
 }
Пример #2
0
 public void DelTopic(string topic)
 {
     SignalrDataStore.RemoveTopic(Context.ConnectionId, topic);
 }
Пример #3
0
        public override async Task OnDisconnectedAsync(Exception exception)
        {
            await SignalrDataStore.RemoveConnection(Context.ConnectionId);

            await base.OnDisconnectedAsync(exception);
        }