zeromq/zmqpp — pull request #47 by xaqq (2014-05-16 04:42:14+00:00)
Title: Zmq reactor

Hello,

I've experimented a bit with the reactor pattern, and felt it was nice enough that it could be useful to have some code to support it more easily in zmqpp.

What changes within this PR:
1. Adds a few method overloads (`check_for`, `has`, `add`, `remove`) to `zmqpp::poller` (so that we can use a `zmq_pollitem_t` directly with the poller).
2. Adds a new `zqmpp::reactor` class. This class is supposed to look like the poller. Methods are similar (but required a `Callable` (which is just a `std::function` parameter; This is the callback for when events occur).
3. Introduces a bit of code duplication in `zmqpp::poller`.

I welcome any thought on having this in zmqpp, or feedbacks on the implementation.

Thank you,