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 0da16e0695.
PrevUpHomeNext
websocket::stream::read_message_max (1 of 2 overloads)

Set the maximum incoming message size option.

Synopsis
void
read_message_max(
    std::size_t amount);
Description

Sets the largest permissible incoming message size. Message frame fields indicating a size that would bring the total message size over this limit will cause a protocol failure.

The default setting is 16 megabytes. A value of zero indicates a limit of the maximum value of a std::uint64_t.

Example

Setting the maximum read message size.

ws.read_message_max(65536);
Parameters

Name

Description

amount

The limit on the size of incoming messages.


PrevUpHomeNext