mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-06 00:31:13 +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.
|
// 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 [])
|
|||||||
// 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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user