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