70#include "cppzmqzoltanext/czze_export.h"
136 using time_point_t = std::chrono::time_point<std::chrono::steady_clock>;
137 using time_milliseconds_t = std::chrono::milliseconds;
144 std::chrono::milliseconds timeout;
145 std::size_t occurences;
146 time_point_t next_occurence;
194 void remove(zmq::socket_ref socket);
232 void run(
bool interruptible =
true,
233 std::chrono::milliseconds interruptCheckInterval = std::chrono::milliseconds{-1});
241 bool terminated() const noexcept {
return _poller.terminated(); }
259 time_milliseconds_t find_next_timeout(time_point_t
const& actual_time);
267 void removeFlagedTimers();
281 std::map<zmq::socket_ref, fn_socket_handler_t> _socket_handlers;
282 std::list<timer_t> _timer_handlers;
284 bool _timer_id_has_overflowed{
false};
285 time_milliseconds_t _interruptCheckInterval{-1};
Event loop for managing socket and timer events.
bool terminated() const noexcept
Check if the event loop has been terminated by interrupt signal or context termination.
Class for efficient polling of multiple ZMQ sockets.
std::function< bool(loop_t &, timer_id_t)> fn_timer_handler_t
Timer event handler callback type.
std::function< bool(loop_t &, zmq::socket_ref)> fn_socket_handler_t
Socket event handler callback type.
std::size_t timer_id_t
Unique identifier for timer instances.
Event polling for monitoring multiple ZMQ sockets.