Spinach.AsynchronousClient.SetMultiMsg C# (CSharp) Method

SetMultiMsg() public method

public SetMultiMsg ( Hashtable IPtoPeer, String msg, String self ) : void
IPtoPeer System.Collections.Hashtable
msg String
self String
return void
        public void SetMultiMsg(Hashtable IPtoPeer, String msg, String self)
        {
            table = IPtoPeer;
            MultiMsg = msg;
            selfip = self;
        }
        public void SendSingleClient()

Usage Example

Example #1
0
        private void computationDone()
        {
            if (permissions.Count > 1)
            {
                string xml = "<ComputationDone>" + "<Pid>" + Pid + "</Pid></ComputationDone>";
                AsynchronousSocketListener msocket = conn.getSocket();
                string myIP = msocket.GetIP();
                string myPort = msocket.GetPort();
                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(temp, xml, myIP + ":" + myPort);
                Thread t = new Thread(new ThreadStart(client.SendMultiClient));
                t.IsBackground = true;
                t.Start();
            }
            setRunFlag(false);
            setStartFlag("");
        }
All Usage Examples Of Spinach.AsynchronousClient::SetMultiMsg