mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-01-31 14:39:56 +01:00
Add event called after we have connected up our paired socket, we are guaranteed to get monitor events after this point.
This is useful if you are spawning the monitor to a different thread and need to wait until monitor has started before opening the socket.
This commit is contained in:
parent
938e4ab07b
commit
37d5ecd7e2
4
zmq.hpp
4
zmq.hpp
@ -448,6 +448,9 @@ namespace zmq
|
||||
|
||||
rc = zmq_connect (s, addr_);
|
||||
assert (rc == 0);
|
||||
|
||||
on_monitor_started();
|
||||
|
||||
while (true) {
|
||||
zmq_msg_t eventMsg;
|
||||
zmq_msg_init (&eventMsg);
|
||||
@ -511,6 +514,7 @@ namespace zmq
|
||||
zmq_close (s);
|
||||
}
|
||||
|
||||
virtual void on_monitor_started() {}
|
||||
virtual void on_event_connected(const zmq_event_t &event_, const char* addr_) {}
|
||||
virtual void on_event_connect_delayed(const zmq_event_t &event_, const char* addr_) {}
|
||||
virtual void on_event_connect_retried(const zmq_event_t &event_, const char* addr_) {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user