Spinach.SwarmMemory.changeTheOwner C# (CSharp) Method

changeTheOwner() public method

public changeTheOwner ( string IPPort, string myIP, string myPort ) : void
IPPort string
myIP string
myPort string
return void
        public void changeTheOwner(string IPPort, string myIP, string myPort)
        {
            try
            {
                string myIPPort = myIP + ":" + myPort;
                setOwner(IPPort);
                string changeOwner = "<ChangeOwner><Pid>" + Pid + "</Pid><IPPort>" + IPPort + "</IPPort></ChangeOwner>";
                List<string> endPoints = Peers();
                Hashtable temp = conn.GetIPtoPeer();
                Hashtable tempToSend = new Hashtable();

                foreach (DictionaryEntry item in temp)
                {
                    if (endPoints.Contains(item.Key.ToString()))
                    {
                        tempToSend.Add(item.Key, item.Value);
                    }
                }
                AsynchronousClient client = new AsynchronousClient();
                client.SetMultiMsg(tempToSend, changeOwner, myIPPort);
                Thread t = new Thread(new ThreadStart(client.SendMultiClientChat));
                t.IsBackground = true;
                t.Start();
            }
            catch (Exception e)
            { Console.WriteLine(e.ToString()); }
            
        }