forked from boostorg/beast
ping_callback is a member of stream (API Change):
fix #446 * The ping_callback option struct is removed. Actions Required: * Change call sites which use ping_callback with set_option to call stream::ping_callback instead.
This commit is contained in:
@@ -193,11 +193,11 @@ boost::asio::ip::tcp::socket sock{ios};
|
||||
{
|
||||
stream<boost::asio::ip::tcp::socket> ws{ios};
|
||||
//[ws_snippet_17
|
||||
ws.set_option(ping_callback(
|
||||
ws.ping_callback(
|
||||
[](bool is_pong, ping_data const& payload)
|
||||
{
|
||||
// Do something with the payload
|
||||
}));
|
||||
});
|
||||
//]
|
||||
|
||||
//[ws_snippet_18
|
||||
|
||||
Reference in New Issue
Block a user