Reusing existing io_service for websocket client?

Jun 12, 2015 at 9:43 AM
I already have an io_service in my application used to receive data from a different system. Is it possible to reuse this io_service for the Casablanca websocket client so that I get all callbacks in the same thread thus won't need to protect my data from simultaneous access?
Jun 12, 2015 at 8:38 PM
Hi DesktopMan,

No there isn't anything exposed in our public API about Boost with the websocket client, so I don't think you will be able to do this. We don't use Boost to power our websocket client on all platforms. For Windows store and phone we use a Windows Runtime API. You could take a look at the code and see if you wanted to try and expose something to make this possible.

All the websocket client code for the Boost based implementation is in ws_client.cpp and ws_client_wspp.cpp.