-
Notifications
You must be signed in to change notification settings - Fork 797
Feat/monitor poll #414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Feat/monitor poll #414
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2232,6 +2232,8 @@ class monitor_t | |
|
|
||
| ZMQ_NODISCARD const void *handle() const ZMQ_NOTHROW { return _monitor_socket.handle(); } | ||
|
|
||
| operator socket_ref() ZMQ_NOTHROW { return (zmq::socket_ref) _monitor_socket; } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, I'd not add an operator here but rather a named
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. |
||
|
|
||
| #if ZMQ_VERSION_MAJOR >= 4 | ||
| bool get_event(zmq_event_t& eventMsg, std::string& address, zmq::recv_flags flags = zmq::recv_flags::none) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure about the signature of this method. What about (This requires C++17 this way, but we can also do this with the fallback to This removes the ambiguity of whether the original value of
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, I'm not very familiar with std::optional and will try to implement this way |
||
| { | ||
|
|
||
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.
Similar to the comment above, I'd use more specific names for these functions. We are in
monitor_t, somonitoris probably redundant, but i'd usesocket_handle.Also, the
constoverload should be removed. There are no functions in the C zmq API that accept aconst void*socket. I now they exist for other classes, but that's rather a legacy.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.
Agreed.