public BufferConsumer( MemorySegment memorySegment, IBufferRecycler recycler, BufferBuilder.PositionMarker currentWriterPosition) : this( new NetworkBuffer(Preconditions.CheckNotNull(memorySegment), Preconditions.CheckNotNull(recycler), true), currentWriterPosition, 0) { }
private BufferConsumer( IBuffer buffer, BufferBuilder.PositionMarker currentWriterPosition, int currentReaderPosition) { _buffer = Preconditions.CheckNotNull(buffer); _writerPosition = new CachedPositionMarker(Preconditions.CheckNotNull(currentWriterPosition)); CurrentReaderPosition = currentReaderPosition; }
public CachedPositionMarker(BufferBuilder.PositionMarker positionMarker) => PositionMarker = positionMarker;