diff options
author | Martin Sustrik <sustrik@fastmq.commkdir> | 2009-11-24 11:23:10 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@fastmq.commkdir> | 2009-11-24 11:23:10 +0100 |
commit | c98fd6bc3f2a49d7cb0b820a07354168c98f60b7 (patch) | |
tree | 894f3dc0e6221284c6608a8819488f4ffede1085 /devices/zmq_forwarder | |
parent | 5cd98bc575517ea72c435770a5313711484f7d34 (diff) |
ZMQII-25: Implement streamed request/reply
Diffstat (limited to 'devices/zmq_forwarder')
-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) { |