BufferedInputRange

This is NOT ACTUALLY an input range! It is too different. Historical mistake kinda.

class BufferedInputRange {
ubyte[] underlyingBuffer;
bool allowGrowth;
ubyte[] view;
Socket source;
bool sourceClosed;
}

Members

Functions

consume
ubyte[] consume(size_t bytes)

Removes n bytes from the front of the buffer, and returns the new buffer slice. You might want to idup the data you are consuming if you store it, since it may be overwritten on the new popFront.

popFront
void popFront(size_t maxBytesToConsume = 0, size_t minBytesToSettleFor = 0, bool skipConsume = false)

A slight difference from regular ranges is you can give it the maximum number of bytes to consume.

Meta