Beispiel #1
0
 public void Shrink()
 {
     if (available == 0)
     {
         databuf = TlsUtilities.EmptyBytes;
         skipped = 0;
     }
     else
     {
         int desiredSize = ByteQueue.NextTwoPow(available);
         if (desiredSize < databuf.Length)
         {
             byte[] tmp = new byte[desiredSize];
             Array.Copy(databuf, skipped, tmp, 0, available);
             databuf = tmp;
             skipped = 0;
         }
     }
 }
Beispiel #2
0
 public ByteQueueStream()
 {
     this.buffer = new ByteQueue();
 }