private void MainSendMSGThread()
        {
            sendMsgClient = new AsyncSocketClient(_maxSize, _maxSendConnections, CommonVariables.LogTool);
            try
            {
                while (IsRunning)
                {
                    if (GetUsingMsgRecordBuffer.Count > 0)
                    {
                        UsingTagForMsgRecord = !UsingTagForMsgRecord;

                        while (GetUnUsingMsgRecordBuffer.Count > 0)
                        {
                            MsgRecordModel msgRecordModel = GetUnUsingMsgRecordBuffer[0];
                            try
                            {
                                string messageStr = CommonFlag.F_MDSVerifyMCSMSG + CommonVariables.serializer.Serialize(msgRecordModel);
                                //CommonVariables.LogTool.Log("begin send mds " + msgRecordModel.MDS_IP + " port:" + msgRecordModel.MDS_Port + messageStr);
                                sendMsgClient.SendMsg(msgRecordModel.MDS_IP, msgRecordModel.MDS_Port, messageStr, msgRecordModel.MsgID, HandlerMsgReturnData);

                                ExeingMsgRecordModels.Add(msgRecordModel);
                            }
                            catch (Exception ex)
                            {
                                GetUsingMsgRecordBuffer.Add(msgRecordModel);
                                CommonVariables.LogTool.Log(msgRecordModel.MsgID + ex.Message + ex.StackTrace);
                            }
                            GetUnUsingMsgRecordBuffer.RemoveAt(0);
                        }
                    }
                    Thread.Sleep(_sendDelay);
                }
            }
            catch (Exception ex)
            {
                CommonVariables.LogTool.Log(ex.Message + ex.StackTrace);
            }
        }
        public void SendMsgToMCS(MCSServer mcsServer, MsgRecord msgRecord)
        {
            String strmsg = CommonFlag.F_MCSVerfiyMDSMSG + CommonVariables.serializer.Serialize(msgRecord);

            asyncSocketClient.SendMsg(mcsServer.MCS_IP, mcsServer.MCS_Port, strmsg, msgRecord.MsgID, HandMCSReturnData);
        }
        public void SendGetMsgToMDS(ClientModel clientModel)
        {
            string messageStr = CommonFlag.F_MDSVerifyMCSGetMSG + CommonVariables.serializer.Serialize(clientModel);

            getMsgClient.SendMsg(clientModel.MDS_IP, clientModel.MDS_Port, messageStr, clientModel.ObjectID, HandlerGetMsgReturnData);
        }