summaryrefslogtreecommitdiff
path: root/perf/c
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/c
parent4631fde7e385ea31e85f41290614afb9bda391c9 (diff)
parent7a5db6041f4f11ed502fa7446da900509dedb00f (diff)
Merge branch 'master' of git@github.com:sustrik/zeromq2
Diffstat (limited to 'perf/c')
-rw-r--r--perf/c/local_thr.c8
-rw-r--r--perf/c/remote_thr.c5
2 files changed, 11 insertions, 2 deletions
diff --git a/perf/c/local_thr.c b/perf/c/local_thr.c
index 68d9ec6..9b94330 100644
--- a/perf/c/local_thr.c
+++ b/perf/c/local_thr.c
@@ -48,9 +48,15 @@ int main (int argc, char *argv [])
ctx = zmq_init (1, 1);
assert (ctx);
- s = zmq_socket (ctx, ZMQ_P2P);
+ s = zmq_socket (ctx, ZMQ_SUB);
assert (s);
+ rc = zmq_setsockopt (s, ZMQ_SUBSCRIBE , "*", 1);
+ assert (rc == 0);
+
+ // Add your socket options here.
+ // For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM.
+
rc = zmq_bind (s, bind_to);
assert (rc == 0);
diff --git a/perf/c/remote_thr.c b/perf/c/remote_thr.c
index 3069640..8814e0f 100644
--- a/perf/c/remote_thr.c
+++ b/perf/c/remote_thr.c
@@ -45,9 +45,12 @@ int main (int argc, char *argv [])
ctx = zmq_init (1, 1);
assert (ctx);
- s = zmq_socket (ctx, ZMQ_P2P);
+ s = zmq_socket (ctx, ZMQ_PUB);
assert (s);
+ // Add your socket options here.
+ // For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM.
+
rc = zmq_connect (s, connect_to);
assert (rc == 0);