justinstenning / SharedMemory

C# shared memory classes for sharing data between processes (Array, Buffer and Circular Buffer)
https://www.nuget.org/packages/SharedMemory
Other
566 stars 118 forks source link

Modified CircularBuffer to limit its Read output to the amount written ... #4

Closed MikeFair closed 8 years ago

MikeFair commented 8 years ago

…to the node instead of using the whole NodeBufferSize.

Replaced _padding0 in the Node struct with AmountWritten; updated the Write functions to assign node->AmountWritten based on the amount written; updated the Read functions to use node->AmountWritten in place of NodeBufferSize when figuring out how much data to return.