Autobahn, C++, Reconnect use

#1

hallo,

how can i reconnect the Autobahn C++ application corectly l(ike loop in me app), can something show me this code?

I have lossed still 200 hours to create this, but i get only frezzes and exception.

I have googling, but it does’not give answer.

the best methode, what i had try:

transport->detach();
transport->attach(std::static_pointer_castautobahn::wamp_transport_handler(session));

transport.reset(new autobahn::wamp_websocketpp_websocket_transportwebsocketpp::config::asio_tls_client

	(ws_client, "wss:/some-URI", false));

``

per while interation.

but i have saw memory leak in transport->conenction + boost::future::then;

As basic code for me app i have used example from autobahn repositorium

https://github.com/crossbario/autobahn-cpp/blob/master/examples/subscriber.cpp

.
P.s. It does’not should be frezze,if i randomly detach internet connection or wi-fi.

0 Likes