Beast Logo

PrevUpHomeNext

dynabuf_readstream::capacity

Set the maximum buffer size.

void
capacity(
    std::size_t size);

This changes the maximum size of the internal buffer used to hold read data. No bytes are discarded by this call. If the buffer size is set to zero, no more data will be buffered.

Thread safety: The caller is responsible for making sure the call is made from the same implicit or explicit strand.

Parameters

size

The number of bytes in the read buffer.

Remarks

This is a soft limit. If the new maximum size is smaller than the amount of data in the buffer, no bytes are discarded.


PrevUpHomeNext