-
Notifications
You must be signed in to change notification settings - Fork 279
[WIP] node-zmq 3 #516
base: master
Are you sure you want to change the base?
[WIP] node-zmq 3 #516
Conversation
| if (zmq_term(context_) < 0) throw std::runtime_error(ErrorMessage()); | ||
| int rc; | ||
|
|
||
| while (true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need the while loop here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, for EINTR
| return Nan::ThrowError(ErrorMessage()); | ||
| } | ||
| break; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IncomingMessage was already doing the init.
|
pretty impressive cleanup to (outside my pay grade) |
|
MessageReference I didn't really touch. I just moved it. But yes, lots of things pertaining to native code have been touched or changed, so @kkoopa's review would be most welcome. |
test/zmq_proxy.xrep-xreq.js
Outdated
| rep.connect(backendAddr); | ||
|
|
||
| req.on('message',function(msg){ | ||
| req.on('message',function (msg) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space btwn comma and function
More style fixes
|
Deifinitely makes the module more interesting. Good effort. |
|
|
||
| ### Constants | ||
|
|
||
| ZeroMQ is full of constants for various that are [well documented](http://api.zeromq.org/). It would be overkill to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*for various what?
TODO: fix
|
@kkoopa @reqshark @ralphtheninja |
|
Yes, that sounds reasonable. |
Yep! |
What about node 6? |
|
When I made this PR, either there was no Node 6, or we didn't support it yet. Of course if I merge this, it will be in a state where it works on Node 6, no worries :) |
|
Excited for many of the changes coming in this PR! 👍 |
|
Thanks :) I really need to pick it up again, have been quite busy lately. |
|
IMO node 5 and node 6 are the same thing in terms of binding compiles... at least using |
|
May I know when will node-zmq 3 be ready? Or has it already been launched? |
|
It's not ready yet. But I'm thinking within about 2-3 weeks it should be. |
|
I'm also facing the same issue as #438 at the moment, but since it will require me to wait for another 2-3 weeks for the issue to be closed until version 3 comes out, may I ask if I can get any temporal help for now to get the ZMQ_IMMEDIATE issue solved? |
|
Time is my problem right now (else I would've shipped node-zmq 3 by now) so if anyone wants to help reinvigorate #438, raise your hands please. |
|
@ronkorving Sure. Hopefully there are someone who will help in this, and in the meantime I'll wait for the next release. Thanks! |
|
To address #552 (asking to be able to share a zmq context between two different node C++ add-ins), I think the right strategy is to extract the class declarations of I'm happy to submit a patch if people like the idea. |
Hopefully, this makes things a bit more sane.
Please note that this would be a major version bump to 3. We will still need to maintain node-zmq 2 for a while (bugfixes), so we should create a 2.x branch off of master before merging this.
Closes #515
Closes #438
Closes #279
Closes #175
Changes:
exports.binding. Users shouldn't need it, but there's no real need to hide it either.zmq.FOO_BAR. All getters and setters are gone. That means you now have to use get(sockopt) and set(sockopt).zmq.contextOptionExists(option),zmq.socketOptionExists(option)andzmq.socketTypeExists(type)functions.TODO:
cc @kkoopa @reqshark