-
Notifications
You must be signed in to change notification settings - Fork 763
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
Feat/monitor poll #414
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; } | ||
|
||
#if ZMQ_VERSION_MAJOR >= 4 | ||
bool get_event(zmq_event_t& eventMsg, std::string& address, zmq::recv_flags flags = zmq::recv_flags::none) | ||
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 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.
Again, I'd not add an operator here but rather a named
socket()
member function. Actually, then thehandle
/socket_handle
function is not necessary at all, since its handle can be accessed through thesocket_ref
.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.