consumeEachBufferRange

inline suspend fun ByteReadChannel.consumeEachBufferRange(visitor: ConsumeEachBufferVisitor)

For every available bytes range invokes visitor function until it return false or end of stream encountered. The provided buffer should be never captured outside of the visitor block otherwise resource leaks, crashes and data corruptions may occur. The visitor block may be invoked multiple times, once or never.