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 an older version of Boost and was released in 2023. The current version is 1.89.0.
Set the compress message write option.
void compress( bool value);
This controls whether or not outgoing messages should be compressed. The setting is only applied when
deflateSupported
is true
stream::set_option
permessage_deflate::msg_size_threshold
This function permits adjusting per-message compression. Changing the opcode after a message is started will only take effect after the current message being sent is complete. The default setting is to compress messages whenever the conditions above are true.
|
Name |
Description |
|---|---|
|
|
|
Disabling compression for a single message.
ws.compress( false ); ws.write(net::buffer(s), ec); ws.compress( true );