Beispiel #1
0
        public void BindToSuperPeer(ISuperPeer sp)
        {
            int spid = 0;
            try
            {
                spid = sp.Id;
                OnMethodCalled(this, new MethodCallEventArgs { Name = "BindToSuperPeer", Id = spid });
                Console.WriteLine(Id+"- SPBind:"+spid);
                if (SuperPeers.ContainsKey(spid))
                {
                    throw new PeerAlreadyRegisteredException();
                }

                SuperPeers.Add(spid, sp);
            }
            catch (WebException)
            {
            }
        }
Beispiel #2
0
 public void BindToSuperPeer(ISuperPeer sp)
 {
     Console.WriteLine(Id + " - Peer Binding to sp - " + sp.Id);
     SuperPeer = sp;
 }