示例#1
0
            protected override void checkForMessage()
            {
                Message         message = new Message();
                ReadWriteResult result  = m_serviceClientQueue.Receive(message);
                //ReadWriteResult result = ReadWriteResult.OK;
                IServerCommand clMethod = null;

                if (result == ReadWriteResult.OK)
                {
                    string data = Encoding.UTF8.GetString(message.MessageBytes, 0, message.MessageBytes.GetLength(0));
                    //string data = "{ \"Name\": \"registerClient\", \"PrinterID\": \"\", \"rhoString\": \"manual_common_spec\" }";

                    Logger.Write("[manager] receive data from client: " + data);

                    clMethod = (IServerCommand)m_methodSelector.selectMethod(data);
                }

                processMessage(clMethod);
            }