示例#1
0
        /// <summary>
        /// 发送消息
        /// </summary>
        /// <param name="msg"></param>
        public override void SendMessage(PBBody pbbody)
        {
            PBPacket packet = PBUtils.NewPacket(pbbody);

            try {
                mSendQueue.Enqueue(packet);
            } catch (Exception ex) {
                new Exception(ex.ToString());
            }
        }
示例#2
0
        /// <summary>
        /// 发送Http消息
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="key"></param>
        public override void SendMessage(PBBody msg, string key = null)
        {
            PBPacket packet = PBUtils.NewPacket(msg);

            if (string.IsNullOrEmpty(key))
            {
                return;
            }
            mReqUrl = mURL + key;
            try {
                mSendQueue.Enqueue(packet);
            } catch (Exception ex) {
                throw new Exception(ex.ToString());
            }
        }