public bool TryAppend(ref SendRequestEntry otherEntry) { var otherEntryLength = otherEntry.RioBufferSegmentDescriptor.Length; if (otherEntryLength > _bufferSegmentLength - BatchingEntry->RioBufferSegmentDescriptor.Length) { return(false); } var endOfBatchingEntryData = BatchingEntry->GetBufferSegmentStart() + BatchingEntry->RioBufferSegmentDescriptor.Length; var startOfCurrentEntryData = otherEntry.GetBufferSegmentStart(); Unsafe.CopyBlockUnaligned(endOfBatchingEntryData, startOfCurrentEntryData, (uint)otherEntryLength); BatchingEntry->RioBufferSegmentDescriptor.Length += otherEntryLength; Size++; return(true); }
public void Initialize(ref SendRequestEntry currentEntry, long sequence) { BatchingEntry = (SendRequestEntry *)Unsafe.AsPointer(ref currentEntry); BatchingEntrySequence = sequence; Size = 1; }