This is my situation: I have a server that opens a socket (ZMQ_DEALER) and bind it with ipc to /tmp/server.ipc. Then I have a shell that is connected to the server with another socket (ZMQ_DEALER). The shell sends to the server some commands and the server executes them.
But, sometimes, some commands are scripts that needs to send other commands to the server.
The problem is that I’m not able to select the socket that has to receive the answer from the server. So it happens that the messages for the shell are processed by the script and vice versa.
Can you help me to understand how to solve this problem? Am I using the wrong socket type?
I have to solve this using only one socket and not two.
If it can help, I’m using the perl bindings of ZeroMQ.
Thank you very much.
I’ve found a solution thanks to michelp on ZeroMQ irc channel.
You can find the solution here:
http://zguide.zeromq.org/page:all#Router-to-Dealer-Routing