Exemplo n.º 1
0
        public void onPush(string topicName, SubscriptionChangeType changeType, int pos, string newValue)
        {
            new Thread(new ThreadStart(() =>
            {
                TopicSubscriptionsCollection value;
                try
                {
                    subscriptions.TryGetValue(topicName, out value);
                    if (value == null)
                    {
                        return;
                    }
                }
                catch (Exception)
                {
                    return;
                }

                foreach (NetEventIO client in value.ToList())
                {
                    if (client != null)
                    {
                        client.subscriptionPush(topicName, changeType, pos, newValue);
                    }
                }
            })).Start();
        }
Exemplo n.º 2
0
 public bool subscriptionPush(string topicName, SubscriptionChangeType changeType, int position)
 {
     if (changeType != SubscriptionChangeType.delete)
     {
         return(false);
     }
     return(this.subscriptionPush(topicName, changeType, position, ""));
 }
Exemplo n.º 3
0
        public bool subscriptionPush(string topicName, SubscriptionChangeType changeType, int position, string newValue)
        {
            if (this.state != NetEventIOClientState.Authenticated)
            {
                return(false);
            }

            Message m = new Message(PacketType.S_subscriptionPush, topicName, ((int)changeType) + "," + position, newValue);

            return(this.sendMessage(m));
        }