richardmillen / zguide-examples

Implementations of the 0MQ examples in the guide.
http://zguide.zeromq.org/page:all
4 stars 0 forks source link

Building a Multithreaded Stack and API in C++ #34

Open richardmillen opened 7 years ago

richardmillen commented 7 years ago

Implement the Building a Multithreaded Stack and API example.

The client stack we've used so far isn't smart enough to handle this protocol properly. As soon as we start doing heartbeats, we need a client stack that can run in a background thread. In the Freelance pattern at the end of Chapter 4 - Reliable Request-Reply Patterns we used a multithreaded API but didn't explain it in detail. It turns out that multithreaded APIs are quite useful when you start to make more complex ZeroMQ protocols like CHP.