-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Can we support asio transport with Asio, rather than Boost.Asio? #324
Comments
This is a feature that I have on my to-do list already. In particular it would extend the library's boost free operation on a C++11 compiler to include the Asio transport as well. In principle it should not be difficult, however it will not be a drop in replacement as the transport code is written today. WebSocket++ Asio transport uses some additional Boost specific features not present in standalone Asio under the assumption that because it is using Boost.Asio that the rest of Boost is available as well. I need to look into how to address those specific items. |
Okay, cool. That's sort of what I had assumed simply based on the way that you refer to websocketpp's dependencies. Thanks for confirming! In the meantime I was surprised by how easy it was to get websocketpp sample code building on OS X using Boost. The nice truth is, getting Boost to work isn't really that hard on most platforms. Still, it helps to trim things down as much as possible. |
Mind if I leave the issue open so maybe you can report back on any progress made for this? |
It is even easier on Linux platforms as boost is usually one apt-get away. Yes, go ahead and leave this open |
This issue has been addressed on the develop branch and will be included in 0.6.0. Define |
Support for standalone Asio has been released in 0.6.0. |
I tried using it without boost. If I define ASIO_STANDALONE I still get a boost related error at type_traits.hpp on the line 46, because WEBSOCKETPP_CPP11_TYPE_TRAITS is not defined. Should I define that one as well? BTW it would be nice to have some instructions for. The only thing I found regarding the topic is this thread and the FAQ, but those don't mention anything else apart from ASIO_STANDALONE. And also, I saw some warning during the compilation that I should not define ASIO_STANDALONE myself... |
You probably have MSVC. C++11 detection is non functional in websocketpp using MSVC beause it relies on __cplusplus valorization which is something MSVC still doesn't do yet. Just give an hint by defining manually |
As far as I can tell, Asio is actually the "real" Asio, Boost.Asio is simply the version of it packaged with Boost which has a non-header-only dependency (Boost.System).
Since we all like the cleanliness of header-only, I was wondering about how feasible it was to use Asio with websocketpp, so that we can get actual async transport for websocketpp while maintaining header-onliness.
The text was updated successfully, but these errors were encountered: