[zeromq-dev] peer-to-peer communication using ZMQ

Yoav Agami yoavagami at yahoo.com
Mon Aug 8 19:53:01 CEST 2016

I am trying to implement inner process communication. The model: Part A -> Sends messages to Part B.
I have implemented this using Client-Server example from tutorial (attached bellow), but facing issues that the process is "locked". What is the best practice to implement this kind of model?It is not classic "Client-Server". Actually just one part sends data to seconds part, and second part uses it.
Is there an option to send a message with a timeout? that it will not lock the process?
Any input / example will be very appreciated!
Server:zmq::context_t context(1);zmq::socket_t socket(context, ZMQ_REP);socket.bind("tcp://*:5555");..socket.recv(&request);
// analyze received data

Client:requester = context.socket(ZMQ.REQ);requester.connect("tcp://localhost:5555");requester.send(str.getBytes(), 0);byte[] reply = requester.recv(0);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20160808/2a03eeed/attachment.htm>

More information about the zeromq-dev mailing list