Add new socket monitor event for when socket monitoring is stopped.

This commit is contained in:
Richard Newton
2013-07-01 11:00:46 +01:00
parent 1cfee8d1e7
commit d4d23caf32
2 changed files with 9 additions and 1 deletions

View File

@@ -1221,6 +1221,12 @@ void zmq::socket_base_t::monitor_event (zmq_event_t event_, const std::string& a
void zmq::socket_base_t::stop_monitor()
{
if (monitor_socket) {
if (monitor_events & ZMQ_EVENT_MONITOR_STOPPED) {
zmq_event_t event;
event.event = ZMQ_EVENT_MONITOR_STOPPED;
event.value = 0;
monitor_event (event, "");
}
zmq_close (monitor_socket);
monitor_socket = NULL;
monitor_events = 0;