Inheritance: CallbackInterface
Exemple #1
0
 public void peerDisconnect(SubscriberLink sub_link)
 {
     //EDB.WriteLine("PEER DISCONNECT: [" + sub_link.topic + "]");
     foreach (SubscriberCallbacks cbs in callbacks)
     {
         if (cbs.disconnect != null && cbs.Callback != null)
         {
             CallbackInterface cb = new PeerConnDisconnCallback(cbs.disconnect, sub_link);
             cbs.Callback.addCallback(cb, cbs.Get());
         }
     }
 }
Exemple #2
0
        public void addCallbacks(SubscriberCallbacks callbacks)
        {
            lock (callbacks_mutex)
            {
                this.callbacks.Add(callbacks);
                if (callbacks.connect != null && callbacks.Callback != null)
                {
                    lock (subscriber_links_mutex)
                    {
                        foreach (SubscriberLink i in subscriber_links)
                        {
                            CallbackInterface cb = new PeerConnDisconnCallback(callbacks.connect, i);

                            callbacks.Callback.addCallback(cb, callbacks.Get());
                        }
                    }
                }
            }
        }
Exemple #3
0
 public void peerDisconnect(SubscriberLink sub_link)
 {
     //EDB.WriteLine("PEER DISCONNECT: [" + sub_link.topic + "]");
     foreach (SubscriberCallbacks cbs in callbacks)
     {
         if (cbs.disconnect != null && cbs.Callback != null)
         {
             CallbackInterface cb = new PeerConnDisconnCallback(cbs.disconnect, sub_link);
             cbs.Callback.addCallback(cb, cbs.Get());
         }
     }
 }
Exemple #4
0
        public void addCallbacks(SubscriberCallbacks callbacks)
        {
            lock (callbacks_mutex)
            {
                this.callbacks.Add(callbacks);
                if (callbacks.connect != null && callbacks.Callback != null)
                {
                    lock (subscriber_links_mutex)
                    {
                        foreach (SubscriberLink i in subscriber_links)
                        {
                            CallbackInterface cb = new PeerConnDisconnCallback(callbacks.connect, i);

                            callbacks.Callback.addCallback(cb, callbacks.Get());
                        }
                    }
                }
            }
        }