Example #1
0
        private void evtReceiveRequest(Socket soc, byte[] byt)
        {
            string str = Encoding.UTF8.GetString(byt);

            try
            {
                //받은 파일을 xml로 전환
                Function.Util.XML clsXml = new Function.Util.XML(Function.Util.XML.enXmlType.String, str);

                clsXml.xml.Save(@"c:\xml.xml");

                clsXml.chSingleNode("report/group");
                int      intCnt   = Convert.ToInt32(clsXml.GetSingleNodeValue("groupCount/count"));
                int      i        = 0;
                string[] strTagID = new string[intCnt];


                //clsXml.chSingleNode("groupList");
                string st = string.Empty;
                foreach (XmlNode xn in clsXml.GetNodeList("groupList/member"))
                {
                    strTagID[i] = xn.SelectSingleNode("epc").InnerText;

                    if (st == string.Empty)
                    {
                        st = "수신 TagID : ";
                    }
                    else
                    {
                        st += "/";
                    }

                    st += strTagID[i];

                    i++;
                }

                clsLog.WLog(st);

                ThreadPool.QueueUserWorkItem(new WaitCallback(ReceiveTagId), strTagID);
            }
            catch (Exception ex)
            {
                clsLog.WLog_Exception("evtReceiveRequest", ex);
                clsLog.WLog("Received String : " + str);
            }
        }