I am using an example from boost beast documentation for async websocket client. The to send some command to subscribe and then to listen feed until it is terminated manually (preferably with other function or else)
Standard examples aren't applied as either it gives no response or it doesn't give permanent feed.
For references Poloniex Websocket API needs to be accessed.
Is there any example of listening to feed permanently?
The idea is to not stop "listening" (and by listening you really just mean reading).
In synchronous code, you just loop the read operation.
In async code, you make it a chain. The echo examples in Asio show this (in several ways).
In this async websocket example you'd change the
on_read
completion handlerTo replace
async_close
with moreasync_read
s e.g.