Commit 72b2f07a authored by Martin Sustrik's avatar Martin Sustrik

ZMQII-36: Chat example & forwarder broken because of changes subscribe semantics

parent 65f450f2
...@@ -54,7 +54,7 @@ int main (int argc, char *argv []) ...@@ -54,7 +54,7 @@ int main (int argc, char *argv [])
// TODO: make the number of I/O threads configurable. // TODO: make the number of I/O threads configurable.
zmq::context_t ctx (1, 1); zmq::context_t ctx (1, 1);
zmq::socket_t in_socket (ctx, ZMQ_SUB); zmq::socket_t in_socket (ctx, ZMQ_SUB);
in_socket.setsockopt (ZMQ_SUBSCRIBE, "*", 1); in_socket.setsockopt (ZMQ_SUBSCRIBE, "", 0);
zmq::socket_t out_socket (ctx, ZMQ_PUB); zmq::socket_t out_socket (ctx, ZMQ_PUB);
int n = 0; int n = 0;
......
...@@ -36,7 +36,7 @@ int main (int argc, const char *argv []) ...@@ -36,7 +36,7 @@ int main (int argc, const char *argv [])
// Initialise 0MQ infrastructure. // Initialise 0MQ infrastructure.
zmq::context_t ctx (1, 1); zmq::context_t ctx (1, 1);
zmq::socket_t s (ctx, ZMQ_SUB); zmq::socket_t s (ctx, ZMQ_SUB);
s.setsockopt (ZMQ_SUBSCRIBE, "*", 1); s.setsockopt (ZMQ_SUBSCRIBE, "", 0);
s.connect (address); s.connect (address);
while (true) { while (true) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment