15#define ZEROMQPOLLER_H 1
24#include <unordered_map>
28 using entry_t = std::tuple<size_t, zmq::event_flags, const zmq::socket_t *>;
31 using sockets_t = std::unordered_map<void *, entry_t>;
34 using fds_t = std::unordered_map<int, fd_entry_t>;
40 std::vector<std::pair<size_t, zmq::event_flags>>
poll(
int timeo = -1);
41 std::vector<std::pair<size_t, zmq::event_flags>>
ppoll(
int timeo,
const sigset_t *sigmask);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Wrapper class for polling ZeroMQ sockets.
std::vector< zmq::pollitem_t > m_items
size_t register_socket(zmq::socket_t &socket, zmq::event_flags type)
Register socket to poll.
std::tuple< size_t, zmq::event_flags > fd_entry_t
std::tuple< size_t, zmq::event_flags, const zmq::socket_t * > entry_t
std::vector< std::pair< size_t, zmq::event_flags > > ppoll(int timeo, const sigset_t *sigmask)
Poll the sockets with ppoll.
std::unordered_map< int, fd_entry_t > fds_t
size_t unregister_socket(zmq::socket_t &socket)
Unregister socket from poller.
std::unordered_map< void *, entry_t > sockets_t
std::vector< std::pair< size_t, zmq::event_flags > > poll(int timeo=-1)
Poll the sockets.