From 40c22cbfa7aea25386f6f13967bbdd17da00657a Mon Sep 17 00:00:00 2001 From: Mohammad Nejati Date: Wed, 14 Feb 2024 07:34:23 +0000 Subject: [PATCH] Update documentation for websocket::permessage_deflate Resolves #962 --- include/boost/beast/websocket/option.hpp | 9 +++++++-- include/boost/beast/websocket/stream.hpp | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/include/boost/beast/websocket/option.hpp b/include/boost/beast/websocket/option.hpp index 817bf911..4c4e4ee6 100644 --- a/include/boost/beast/websocket/option.hpp +++ b/include/boost/beast/websocket/option.hpp @@ -21,8 +21,13 @@ namespace websocket { These settings control the permessage-deflate extension, which allows messages to be compressed. - @note Objects of this type are used with - @ref beast::websocket::stream::set_option. + @note + + These settings should be configured before performing the WebSocket + handshake. + + Objects of this type are used with + @ref beast::websocket::stream::set_option. */ struct permessage_deflate { diff --git a/include/boost/beast/websocket/stream.hpp b/include/boost/beast/websocket/stream.hpp index 8dec12b1..0b9baf2b 100644 --- a/include/boost/beast/websocket/stream.hpp +++ b/include/boost/beast/websocket/stream.hpp @@ -398,6 +398,11 @@ public: @throws invalid_argument if `deflateSupported == false`, and either `client_enable` or `server_enable` is `true`. + + @note + + These settings should be configured before performing the WebSocket + handshake. */ void set_option(permessage_deflate const& o);