Initial stab at a context level monitor callback and registration API

This commit is contained in:
Lourens Naudé
2012-05-21 20:47:11 +01:00
parent e13b3723b8
commit 4767159f39
8 changed files with 118 additions and 146 deletions

View File

@@ -95,12 +95,17 @@ namespace zmq
void unregister_endpoints (zmq::socket_base_t *socket_);
endpoint_t find_endpoint (const char *addr_);
// Monitoring specific
int monitor (zmq_monitor_fn *monitor_);
void monitor_event (zmq::socket_base_t *socket_, int event_, ...);
enum {
term_tid = 0,
reaper_tid = 1
};
~ctx_t ();
private:
@@ -163,6 +168,9 @@ namespace zmq
// Synchronisation of access to context options.
mutex_t opt_sync;
// Monitoring callback
zmq_monitor_fn *monitor_fn;
ctx_t (const ctx_t&);
const ctx_t &operator = (const ctx_t&);
};