I have just now updated the boost library from 1.68.0
to 1.70.0
to get the timeouts operations in (beast) websocket ssl client async example.
In the above link you will see:
void
on_resolve(
beast::error_code ec,
tcp::resolver::results_type results)
{
if(ec)
return fail(ec, "resolve");
// Set a timeout on the operation
beast::get_lowest_layer(ws_).expires_after(std::chrono::seconds(30));
// Make the connection on the IP address we get from a lookup
beast::get_lowest_layer(ws_).async_connect(
results,
beast::bind_front_handler(
&session::on_connect,
shared_from_this()));
}
There are more than one function which is using this structure for the timeouts. And for my code (in eclipse-cdt I see it like this
The error says (when mouse pointer hovers on the expires_after or async_connect):
Method 'expires_after' could not be resolved
OR
Method 'async_connect' could not be resolved
and when the mouse pointer is taken over "get_lowest_layer", the error says
Invalid arguments '
Candidates are:
boost::beast::detail::lowest_layer_type_impl<#0,bool74 0 value 43 8 2 201 2
boost::beast::detail::has_next_layer_impl
boost::beast::detail::has_next_layer_impl 1 #0 0 71 4417 0 0>::type & get_lowest_layer(#0 &) '
I am wondering I need to link some library for this. I can't figure out which one. Any suggestions?