diff --git a/CHANGELOG.md b/CHANGELOG.md index 42e695d4..826b9cf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ Version 162: * Add asio_handler_invoke overloads for stream algorithms +* Improve websocket::stream::control_callback javadoc -------------------------------------------------------------------------------- diff --git a/include/boost/beast/websocket/stream.hpp b/include/boost/beast/websocket/stream.hpp index 4d6e568d..90cb7532 100644 --- a/include/boost/beast/websocket/stream.hpp +++ b/include/boost/beast/websocket/stream.hpp @@ -578,10 +578,14 @@ public: an asynchronous operation, the callback will be invoked using the same method as that used to invoke the final handler. - @note It is not necessary to send a close frame upon receipt - of a close frame. The implementation does this automatically. - Attempting to send a close frame after a close frame is - received will result in undefined behavior. + @note Incoming ping and close frames are automatically + handled. Pings are responded to with pongs, and a close frame + is responded to with a close frame leading to the closure of + the stream. It is not necessary to manually send pings, pongs, + or close frames from inside the control callback. + Attempting to manually send a close frame from inside the + control callback after receiving a close frame will result + in undefined behavior. */ void control_callback(std::function cb)