示例#1
0
        public void setdatatoweb()
        {
            while (true)
            {
                Socket [] Sockets = soclist.ToArray();
                foreach (Socket soc in Sockets)
                {
                    try
                    {
                        foreach (string item in listtequipment.Keys)
                        {
                            tequipment tq = listtequipment[item] as tequipment;
                            if (tq != null)
                            {
                                SendRoot <tequipment>(soc, 0x01, "getdata", tq, 0, "token");
                            }
                        }
                    }
                    catch (Exception e)
                    { }
                }

                System.Threading.Thread.Sleep(3000);
            }
        }
示例#2
0
        public void getequipmentData(Socket soc, WeaveSession _0x01)
        {
            tequipment tq = _0x01.GetRoot <tequipment>();

            if (listtequipment[tq.SnID] == null)
            {
                listtequipment.Add(tq.SnID, tq);
            }
            else
            {
                listtequipment[tq.SnID] = tq;
            }
        }