mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-10-16 18:56:56 +02:00
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:
6
zmq.hpp
6
zmq.hpp
@@ -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 ()));
|
||||
|
Reference in New Issue
Block a user