Exemplo n.º 1
0
        public void PieceDecoding()
        {
            PieceMessage message = new PieceMessage(15, 10, Constants.BlockSize);

            message.SetData(new MemoryPool().Rent(Constants.BlockSize));
            EncodeDecode(message);
        }
Exemplo n.º 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));
        }