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

This is the documentation for a snapshot of the develop branch, built from commit 1376d717c6.
PrevUpHomeNext
websocket::stream::read_size_hint (2 of 2 overloads)

Returns a suggested maximum buffer size for the next call to read.

Synopsis
template<
    class DynamicBuffer>
std::size_t
read_size_hint(
    DynamicBuffer& buffer) const;
Description

This function returns a reasonable upper limit on the number of bytes for the size of the buffer passed in the next call to read. The number is determined by the state of the current frame and whether or not the permessage-deflate extension is enabled.

Parameters

Name

Description

buffer

The buffer which will be used for reading. The implementation will query the buffer to obtain the optimum size of a subsequent call to buffer.prepare based on the state of the current frame, if any.


PrevUpHomeNext