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 ... #3

Closed MikeFair closed 8 years ago

MikeFair commented 8 years ago

…to the node instead of the whole NodeBufferSize.

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

justinstenning commented 8 years ago

Could you also please target the "develop" branch for the new pull. I don't think it is possible for me to change it in GitHub easily...

MikeFair commented 8 years ago

@spazzarama; changes made. :)