示例#1
0
        /// <summary>
        /// 触发回调委托
        /// </summary>
        protected override void TriggerSocketInvoke()
        {
            var sb = RBuffer.TakeStreamBuffer();

            while (sb != null)
            {
                if (socketInvoke != null)
                {
                    socketInvoke.OnReceivedCompleted(new SocketMsg(0, sb, this));
                }
                // 提取下一个
                sb = RBuffer.TakeStreamBuffer();
            }
        }
示例#2
0
 /// <summary>
 /// 触发回调委托
 /// </summary>
 internal void TriggerSocketInvoke()
 {
     byte[] sb = null;
     do
     {
         if (RBuffer != null)
         {
             sb = RBuffer.TakeStreamBuffer();
         }
         if (sb == null)
         {
             return;
         }
         if (SocketInvoke != null)
         {
             SocketInvoke.OnReceivedCompleted(new RemoteSocketMsg(0, sb, this));
         }
     } while (true);
 }