I've built an app that connects to bitmex through boost::beast. The synchronous call works fine using the code provided at:
however the code that does the same thing asynchronously at: https://www.boost.org/doc/libs/master/libs/beast/example/websocket/client/async-ssl/websocket_client_async_ssl.cpp
always breaks (cores) exactly when the websocket handshake is performed:
on_ssl_handshake(boost::system::error_code ec)
{
if(ec)
return ;//fail(ec, "ssl_handshake");
// Perform the websocket handshake
**ws_.async_handshake(host_, "/realtime",
std::bind(
&session::on_handshake,
shared_from_this(),
std::placeholders::_1));**
}
The /realtime is the target that the data should be coming from on the server side.