Sample Video Frame
Exercise 44: Ring Buffer
Ring buffers are incredibly useful when processing asynchronous I/O. They allow one side to receive data in random intervals of random sizes, but feed cohesive chunks to another side in set sizes or intervals. They are a variant on the
Queue data structure but focus on blocks of bytes instead of a list of pointers. In this exercise, I'm going to show you the
RingBuffer code, and then have you make a full unit test for it.
Register for Learn C the Hard Way
Register today for the course and get the all currently available videos and lessons, plus all future modules for no extra charge.