Example #1
0
        private void EventCollectFunc()
        {
            Int32         ret      = 0;
            Int16         clientNo = -1;
            SEventElement ev       = new SEventElement();

            while (_eventThreadStart)
            {
                ret = HncApi.HNC_EventGetSysEv(ref ev);
                if (ret != 0)
                {
                    continue;
                }

                short[] info = new short[2];
                Buffer.BlockCopy(ev.buf, 0, info, 0, info.Length);
                clientNo = info[0];

                SessionManager.Instance().PublishEvent(ev, clientNo);
            }
        }