|
Boost : |
From: Dominique Devienne (ddevienne_at_[hidden])
Date: 2020-12-14 09:44:11
On Mon, Dec 14, 2020 at 10:27 AM Rakshita Parihar via Boost <
boost_at_[hidden]> wrote:
> [...], I need to setup a Pub/Sub message service model. Presently, I am
> using MQTT Paho C
libraries to transmit data to server over TCP IP protocol but I want to
> switch to boost C++
> library for the publish/subscribe model.
>
> *1) Is there any boost C++ library for pub/sub model? If yes, please give
> me the details or link for the tutorial.*
>
Nothing built-in, no. There's Boost.Beast, so you could build it on top of
WebSocket yourself. C++11.
https://www.boost.org/doc/libs/1_75_0/libs/beast/doc/html/index.html
*2) If no library is present, please tell me how to implement a
> message pub/sub
> <https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern> service
> to communicate using boost C++ library?*
>
Outside Boost, there's also https://github.com/uNetworking/uWebSockets
which is C++17 and has PubSub.
(Warning, examples require C++20, and author is not friendly to newbie
questions)
Both approaches depend on WebSocket, so available from the Browser too. But
you could also use
Boost.ASIO directly if you want to avoid WebSocket, and go one level down
to pure TCP/IP.
https://www.boost.org/doc/libs/1_75_0/doc/html/boost_asio.html
I'm a novice in this field though. Hopefully you'll get a better answer
later.
In all cases, there's a learning curve to what you're trying to do :) --DD
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk