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 an old version of Boost. Click here to view this page for the latest version.
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