问题
Does anyone know of any attempt to implement the Web Sockets API using Boost asio?
回答1:
Wt implemented WebSockets on top of boost::asio.
回答2:
I realize this is an old thread, but wanted to update to help those looking for an answer: WebSocket++ fits the bill perfectly. Wt is an entire framework and may be more than many people want.
回答3:
Beast is another project, demonstrated at CppCon 2016 and used in rippled, an open source server application that implements a decentralized cryptocurrency system.
Also see this related question.
回答4:
The closest example I know of anyone doing anything remotely like what you're asking is the Mongoose project. There is an increasing amount of discussion on the Mongoose mailing list about persistent connections for HTTP - but that's obviously not exactly Web Sockets. I would hope that someone would be able to add Web Sockets to it, too, eventually.
来源:https://stackoverflow.com/questions/1894469/boost-asio-and-web-sockets