summaryrefslogtreecommitdiff
path: root/src/ctx.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ctx.hpp')
-rw-r--r--src/ctx.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ctx.hpp b/src/ctx.hpp
index a31e1d8..5f6cc83 100644
--- a/src/ctx.hpp
+++ b/src/ctx.hpp
@@ -24,6 +24,8 @@
#include <vector>
#include <string>
+#include "../include/zmq.h"
+
#include "signaler.hpp"
#include "semaphore.hpp"
#include "ypipe.hpp"
@@ -74,6 +76,9 @@ namespace zmq
void unregister_endpoints (class socket_base_t *socket_);
class socket_base_t *find_endpoint (const char *addr_);
+ // Logging.
+ void log (zmq_msg_t *msg_);
+
private:
~ctx_t ();
@@ -125,6 +130,11 @@ namespace zmq
// Synchronisation of access to the list of inproc endpoints.
mutex_t endpoints_sync;
+ // PUB socket for logging. The socket is shared among all the threads,
+ // thus it is synchronised by a mutex.
+ class socket_base_t *log_socket;
+ mutex_t log_sync;
+
ctx_t (const ctx_t&);
void operator = (const ctx_t&);
};