public void sendTo(IWebSocketConnection socket) {
     Dem2Hub.sendItTo(this, socket);
     if (operation == 'u' || operation == 'c')
     {
         var subs = new Subscription() { onEntityId = entity.Id };  //we presume, that the entity will be displayed at the client, so we subscribe him
         subs.subscribe(socket);
     }
 }
Exemple #2
0
 public void UnsubscribeFromEntity(Subscription subs) {
     ServerClientEntity ent = subs.onEntity;
     
     ent.Unsubscribe(this);
 }
Exemple #3
0
        public List<Subscription> subscriptions { get; set; }       //these need to be iterated over when user disconnects and removed

        public void SubscribeToEntity(Subscription subs) {
            ServerClientEntity ent = subs.onEntity;
            subscriptions.Add(subs);
            ent.Subscribe(this);
        }