This repository has been archived by the owner on Apr 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 284
How to receive a reply when using REQ socket? #583
Comments
OK I figured that message event is fired instead.
|
Reopening this because it's HIGHLY inconvenient to work with REQ socket this way. I'll explain why. If you have RPC interface that takes data, performs request and returns response, you have to do some magic dance to funnel received response back to RPC implementation, also you have to take care of execution order, etc. It would be great if there was a way to send request with callback that would be called with response, i.e: socket.send(req, function (resp) {
// do something
}); |
I agree to you, in that it would need extra code/multipart messages to match responses to previous requests in the 'message'-event callback. Your suggestion looks much better. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am looking at some py bindings for zeromq and what they do for REQ socket is:
.recv()
is undefined in zeromq.node and I don't see an alternative for that either. Would you mind pointing me in the right direction?The text was updated successfully, but these errors were encountered: