Problem: poller_t does not support modify

Solution: Added `modify` method based on `zmq_poller_modify` and test cases
covering it.
Reduced code duplication in existing test cases by introducing
`client_server_setup` helper struct.
This commit is contained in:
Pawel Kurdybacha
2018-04-24 21:16:01 +01:00
parent dcdf828230
commit 85e05b0c88
2 changed files with 104 additions and 43 deletions

View File

@@ -1083,6 +1083,12 @@ namespace zmq
throw error_t ();
}
void modify (zmq::socket_t &socket, short events)
{
if (0 != zmq_poller_modify (poller_ptr, socket.ptr, events))
throw error_t ();
}
bool wait (std::chrono::milliseconds timeout)
{
int rc = zmq_poller_wait_all (poller_ptr, poller_events.data (), static_cast<int> (poller_events.size ()), static_cast<long>(timeout.count ()));