Пример #1
0
        public ByteBuf GetBuffer()
        {
            int    size;
            IntPtr dataPtr = GetDefaultDataIntPtr(out size);
            MemorySegmentByteBuffer byteBuf = WrapMemorySegment(dataPtr, 0 /* filledSize */);

            return(byteBuf);
        }
Пример #2
0
        public MemorySegmentByteBuffer WrapMemorySegment(IntPtr dataPtr, int filledSize)
        {
            IntPtr memSegPtr = MemorySegment.GetMemSegPtrByDataPtr(dataPtr);

            MemorySegmentByteBuffer byteBuf = GetByteBufCore();

            byteBuf.Attach(memSegPtr);
            byteBuf.SetWrite(filledSize);

            return(byteBuf);
        }
Пример #3
0
 internal void Release(MemorySegmentByteBuffer unmanagedByteBuf)
 {
 }