Exemple #1
0
 public void Push(NetworkInfo msg, ref LinkMsg pCurLink)
 {
     msgList[count] = msg;
     count++;
     if (count >= msgList.Length)
     {
         this.next = new LinkMsg();
         pCurLink  = this.next;
     }
 }
 public void Clear()
 {
     for (NetworkInfo msg = this.Pop(); msg != null; msg = this.Pop())
     {
         if (msg.buffer != null)
         {
             msg.buffer.Close();
         }
     }
     this.writeMsg = new LinkMsg();
     this.readMsg  = this.writeMsg;
 }
Exemple #3
0
        public NetworkInfo Read(ref LinkMsg pCurLink)
        {
            NetworkInfo msg = null;

            if (count > pos)
            {
                msg          = msgList[pos];
                msgList[pos] = null;
                pos++;
            }
            else if (this.next != null)
            {
                pCurLink = this.next;
                LinkMsg.Listcount++;
                msgList   = null;
                this.next = null;
                return(pCurLink.Read(ref pCurLink));
            }
            return(msg);
        }