Example #1
0
        private void run()
        {
            while (bRunFlag)
            {
                PackVo vo = receivingQManager.poll();
                if (vo == null)
                {
                    if (bRunFlag)
                    {
                        clientThread.heartbeatTimeout();
                    }
                    continue;
                }

                byte op_code = vo.OP_Code;

                if (op_code == OP_Code.CONFIRM)
                {
                    clientThread.receiveConfirm();
                }
                else if (op_code == OP_Code.DATA)
                {
                    clientThread.receiveData(vo.Data);
                }
                else if (op_code == OP_Code.REJECT)
                {
                    clientThread.receiveReject(vo.Data);
                }
            }
        }