Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext
buffered_read_stream::capacity

Set the maximum buffer size.

Synopsis
void
capacity(
    std::size_t size);
Description

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

Name

Description

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