The type of the input stream. This must have a function read that can read into the buffer's window.
The input stream to use. If not specified, then a NullDev source is assumed.
An iopipe that uses a RingBuffer to read data from the given device source.
Create a ring buffer to manage the data from the given source, and wrap into an iopipe.
The iopipe RingBuffer type uses virtual memory mapping to have the same segment of data mapped to consecutive addresses. This allows true zero-copy usage. However, it does require use of resources that may possibly be limited, so you may want to justify that it's needed before using instead of bufd.
Note also that a RingBuffer is not copyable (its destructor will unmap the memory), so this must use RefCounted to properly work.