60#include "cppzmqzoltanext/czze_export.h"
103 void add(zmq::socket_ref socket);
115 void remove(zmq::socket_ref socket);
157 std::size_t
size() const noexcept {
return _poll_items.size(); }
196 zmq::socket_ref wait(std::chrono::milliseconds timeout = std::chrono::milliseconds{-1});
216 std::vector<zmq::socket_ref> wait_all(std::chrono::milliseconds timeout = std::chrono::milliseconds{-1});
225 bool has_socket(
void* socket_handle)
const;
228 std::vector<zmq::pollitem_t> _poll_items;
229 bool _interruptible{
true};
230 bool _terminated{
false};
Class for efficient polling of multiple ZMQ sockets.
bool is_interruptible() const noexcept
Check if polling is interruptible.
void set_interruptible(bool interruptible) noexcept
Set whether polling should be interruptible.
std::size_t size() const noexcept
Get the number of sockets in the polling set.
bool terminated() const noexcept
Check if the poller has been terminated during the last wait operation.