mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-10-15 15:16:52 +02:00
Problem: Poller size function missing
Solution: Add it to poller_t
This commit is contained in:
9
zmq.hpp
9
zmq.hpp
@@ -2653,6 +2653,15 @@ template<typename T = no_user_data> class poller_t
|
||||
throw error_t();
|
||||
}
|
||||
|
||||
#if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 3, 3)
|
||||
size_t size() const noexcept
|
||||
{
|
||||
int rc = zmq_poller_size(const_cast<void *>(poller_ptr.get()));
|
||||
ZMQ_ASSERT(rc >= 0);
|
||||
return static_cast<size_t>(std::max(rc, 0));
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
struct destroy_poller_t
|
||||
{
|
||||
|
Reference in New Issue
Block a user