summaryrefslogtreecommitdiff
path: root/perf/cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-09-16 14:03:42 +0200
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-09-16 14:03:42 +0200
commita71d00288008b7ed1dc91b6ad3d5fdf25a5e683e (patch)
treec4c1dde7b4cb638c88fc92647bdae836ab8216ea /perf/cpp
parent4631fde7e385ea31e85f41290614afb9bda391c9 (diff)
parent7a5db6041f4f11ed502fa7446da900509dedb00f (diff)
Merge branch 'master' of git@github.com:sustrik/zeromq2
Diffstat (limited to 'perf/cpp')
-rw-r--r--perf/cpp/local_thr.cpp8
-rw-r--r--perf/cpp/remote_thr.cpp6
2 files changed, 12 insertions, 2 deletions
diff --git a/perf/cpp/local_thr.cpp b/perf/cpp/local_thr.cpp
index 7d40904..cbcc106 100644
--- a/perf/cpp/local_thr.cpp
+++ b/perf/cpp/local_thr.cpp
@@ -36,7 +36,13 @@ int main (int argc, char *argv [])
zmq::context_t ctx (1, 1);
- zmq::socket_t s (ctx, ZMQ_P2P);
+ zmq::socket_t s (ctx, ZMQ_SUB);
+
+ s.setsockopt (ZMQ_SUBSCRIBE , "*", 1);
+
+ // Add your socket options here.
+ // For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM.
+
s.bind (bind_to);
zmq::message_t msg;
diff --git a/perf/cpp/remote_thr.cpp b/perf/cpp/remote_thr.cpp
index 15a4ed1..3eee16c 100644
--- a/perf/cpp/remote_thr.cpp
+++ b/perf/cpp/remote_thr.cpp
@@ -36,7 +36,11 @@ int main (int argc, char *argv [])
zmq::context_t ctx (1, 1);
- zmq::socket_t s (ctx, ZMQ_P2P);
+ zmq::socket_t s (ctx, ZMQ_PUB);
+
+ // Add your socket options here.
+ // For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM.
+
s.connect (connect_to);
for (int i = 0; i != message_count; i++) {