BufferedInputRange

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

class BufferedInputRange {
version(cgi_use_fiber)
bool registered;
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, size_t minBytesToSettleFor, bool skipConsume)

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

Meta