Improve websocket::stream::control_callback javadoc

fix #1053
This commit is contained in:
Vinnie Falco
2018-03-01 11:31:41 -08:00
parent 726118468b
commit ebd036a300
2 changed files with 9 additions and 4 deletions

View File

@ -1,6 +1,7 @@
Version 162: Version 162:
* Add asio_handler_invoke overloads for stream algorithms * Add asio_handler_invoke overloads for stream algorithms
* Improve websocket::stream::control_callback javadoc
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@ -578,10 +578,14 @@ public:
an asynchronous operation, the callback will be invoked using an asynchronous operation, the callback will be invoked using
the same method as that used to invoke the final handler. the same method as that used to invoke the final handler.
@note It is not necessary to send a close frame upon receipt @note Incoming ping and close frames are automatically
of a close frame. The implementation does this automatically. handled. Pings are responded to with pongs, and a close frame
Attempting to send a close frame after a close frame is is responded to with a close frame leading to the closure of
received will result in undefined behavior. 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 void
control_callback(std::function<void(frame_type, string_view)> cb) control_callback(std::function<void(frame_type, string_view)> cb)