mirror of
https://github.com/Azure/DotNetty.git
synced 2026-10-26 02:50:07 +08:00
Motivation: Ported/Re-implemented Protobuf codec support into DotNetty Modifications: - Added Protobuf 2/3 Codec project - Added Protobuf 2/3 Codec unit test project. - Extra: Ported MessageToByteEncoder to DotNetty.Codec. Result: Protobuf 2/3 codec supported by DotNetty.
19 lines
484 B
C#
19 lines
484 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
namespace DotNetty.Codecs.Tests.Protobuf
|
|
{
|
|
using DotNetty.Buffers;
|
|
|
|
static class TestUtil
|
|
{
|
|
internal static byte[] GetReadableBytes(IByteBuffer byteBuffer)
|
|
{
|
|
var data = new byte[byteBuffer.ReadableBytes];
|
|
byteBuffer.ReadBytes(data);
|
|
|
|
return data;
|
|
}
|
|
}
|
|
}
|