Exemplo n.º 1
0
        public void Append(byte[] buffer, int offset, int count)
        {
            // always copy the buffer to ensure isolation of the input data from the object under test
            buffer = CopyBytes(buffer);

            var cc = new CodeClock();

            cc.Start();
            _bb.Append(buffer, offset, count);
            cc.Stop();
            Report(cc, "Append", count);
        }
Exemplo n.º 2
0
 protected void SendInternal(ReadOnlySpan <byte> data)
 {
     if (IsWritable)
     {
         SendBuffer.Append(data);
         if (!isSending)
         {
             isSending = true;
             SendImplement(SendBuffer);
         }
     }
     else
     {
         Logger.LogError("send buffer is not writable yet!");
     }
 }
Exemplo n.º 3
0
 public virtual void OnReceive(ReadOnlySpan <byte> data)
 {
     RecvBuffer.Append(data);
 }