-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add NORM Transport configuration sockopts #4541
Conversation
…se of existing sockopts ZMQ_RATE for NORM fixed-rate operation, and ZMQ_TOS
src/options.cpp
Outdated
@@ -257,6 +257,16 @@ zmq::options_t::options_t () : | |||
can_recv_disconnect_msg (false), | |||
hiccup_msg (), | |||
can_recv_hiccup_msg (false), | |||
#ifdef ZMQ_HAVE_NORM |
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.
no need for an ifdef here and in the header
include/zmq.h
Outdated
/******************************************************************************/ | ||
/* NORM transport configuration options */ | ||
/******************************************************************************/ | ||
#ifdef ZMQ_HAVE_NORM |
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.
don't ifdef and move to the DRAFT section, and add to src/zmq_drafts.hpp too
Updated as requested to move NORM sockopts over to DRAFT API. |
include/zmq.h
Outdated
@@ -682,6 +682,23 @@ ZMQ_EXPORT void zmq_threadclose (void *thread_); | |||
#define ZMQ_XSUB_VERBOSE_UNSUBSCRIBE 115 | |||
#define ZMQ_TOPICS_COUNT 116 | |||
|
|||
/* DRAFT NORM socket options */ | |||
#define ZMQ_NORM_MODE 150 |
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.
number these from 117 and up to follow from the rest
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.
Yeah, I wasn't sure what to do about that. I thought it might make sense to separate it numerically to leave room for other potential NORM settings, since there are a lot of NORM configuration options that could still be added. I suppose in the end, it doesn't really matter though.
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.
Done.
see https://github.com/zeromq/libzmq/actions/runs/4756140185/jobs/8451271633?pr=4541 for code formatting changes |
NORM transport is currently hard-coded to particular NORM settings and modes. This pull request adds some NORM configuration parameters as socket options to allow for more flexibility in configuring NORM transport for different use cases. Default values and modes remain the same. The pull also makes use of existing socket options ZMQ_RATE (for NORM fixed-rate operation, not used in congestion control modes) and ZMQ_TOS.