Can I use the following approach?
zmq::context_t context (1);
zmq::socket_t socket (context, ZMQ_REQ);
std::string input = "abc";
int messageLength = input.length();
zmq::message_t request (messageLength);
memcpy ((void *) request.data (), input.c_str(), messageLength);
socket.connect ("tcp://192.168.0.1:8080");
socket.send (request);
socket.connect ("tcp://192.168.0.2:8080");
socket.send (request);
socket.connect ("tcp://192.168.0.3:8080");
socket.send (request);
...
Or is there any correct way to send the same message to multiple
endpoints? Endpoints are about 2 - 6.
As I understand PUB-SUB pattern is good for such tasks but I have to
communicate through many networks without proxy.
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev