diff options
author | malosek <malosek@fastmq.com> | 2009-11-30 16:45:36 +0100 |
---|---|---|
committer | malosek <malosek@fastmq.com> | 2009-11-30 16:45:36 +0100 |
commit | c637bf292d0dc97be5c94c5c96a033c2d665576c (patch) | |
tree | f6e82c3003ac1e4a646f588a7423d60c0e7dcc23 /devices/zmq_forwarder/zmq_forwarder.cpp | |
parent | 9ccf2b42cf932b4c29ea20cc9c6e3d5d8e7a62b4 (diff) | |
parent | fa1641afc593be5926e558381861112b584e861a (diff) |
Merge branch 'master' of git@github.com:sustrik/zeromq2
Diffstat (limited to 'devices/zmq_forwarder/zmq_forwarder.cpp')
-rw-r--r-- | devices/zmq_forwarder/zmq_forwarder.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/devices/zmq_forwarder/zmq_forwarder.cpp b/devices/zmq_forwarder/zmq_forwarder.cpp index 32af5dd..d29ed62 100644 --- a/devices/zmq_forwarder/zmq_forwarder.cpp +++ b/devices/zmq_forwarder/zmq_forwarder.cpp @@ -23,7 +23,7 @@ int main (int argc, char *argv []) { if (argc != 2) { - fprintf (stderr, "usage: forwarder <config-file>\n"); + fprintf (stderr, "usage: zmq_forwarder <config-file>\n"); return 1; } @@ -53,8 +53,9 @@ int main (int argc, char *argv []) // TODO: make the number of I/O threads configurable. zmq::context_t ctx (1, 1); - zmq::socket_t in_socket (ctx, ZMQ_P2P); - zmq::socket_t out_socket (ctx, ZMQ_P2P); + zmq::socket_t in_socket (ctx, ZMQ_SUB); + in_socket.setsockopt (ZMQ_SUBSCRIBE, "*", 1); + zmq::socket_t out_socket (ctx, ZMQ_PUB); int n = 0; while (true) { |