예제 #1
0
        public void PieceDecoding()
        {
            PieceMessage message = new PieceMessage(15, 10, Constants.BlockSize);

            message.SetData(new MemoryPool().Rent(Constants.BlockSize));
            EncodeDecode(message);
        }
예제 #2
0
        public void PieceEncoding()
        {
            PieceMessage message = new PieceMessage(15, 10, Constants.BlockSize);

            message.SetData(new MemoryPool().Rent(Constants.BlockSize));
            message.Encode(buffer.AsSpan(offset, message.ByteLength));
        }