コード例 #1
0
ファイル: InteropUtil.cs プロジェクト: pacificIT/TomP2P.NET
        public static byte[] ExtractBytes(AlternativeCompositeByteBuf buf)
        {
            var buffer = buf.NioBuffer();
            buffer.Position = 0;

            var bytes = new byte[buffer.Remaining()];
            buffer.Get(bytes, 0, bytes.Length);
            return bytes;
        }
コード例 #2
0
ファイル: InteropUtil.cs プロジェクト: lanicon/TomP2P.NET
        public static byte[] ExtractBytes(AlternativeCompositeByteBuf buf)
        {
            var buffer = buf.NioBuffer();

            buffer.Position = 0;

            var bytes = new byte[buffer.Remaining()];

            buffer.Get(bytes, 0, bytes.Length);
            return(bytes);
        }