mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 18:40:27 +01:00
ZMQII-36: Chat example & forwarder broken because of changes subscribe semantics
This commit is contained in:
parent
65f450f22e
commit
72b2f07a70
@ -54,7 +54,7 @@ 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_SUB);
|
||||
in_socket.setsockopt (ZMQ_SUBSCRIBE, "*", 1);
|
||||
in_socket.setsockopt (ZMQ_SUBSCRIBE, "", 0);
|
||||
zmq::socket_t out_socket (ctx, ZMQ_PUB);
|
||||
|
||||
int n = 0;
|
||||
|
@ -36,7 +36,7 @@ int main (int argc, const char *argv [])
|
||||
// Initialise 0MQ infrastructure.
|
||||
zmq::context_t ctx (1, 1);
|
||||
zmq::socket_t s (ctx, ZMQ_SUB);
|
||||
s.setsockopt (ZMQ_SUBSCRIBE, "*", 1);
|
||||
s.setsockopt (ZMQ_SUBSCRIBE, "", 0);
|
||||
s.connect (address);
|
||||
|
||||
while (true) {
|
||||
|
Loading…
Reference in New Issue
Block a user