Skip to content
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

Default settings are not documented and options stream operator is unhelpful #40

Open
michihenning opened this issue May 9, 2023 · 1 comment

Comments

@michihenning
Copy link

The documentation does not state what defaults are used by the various options. For example, in ntca_streamsocketoptions.h, there are numerous settings, but the doc doesn't say what each one is if I don't set it explicitly.

It would be nice to have the documentation complete for this (and quite a few other classes that do similar things). That way, I wouldn't have to read the code or write a test case to find out.

I got surprised by this when I noticed that, by default, Nagle is turned off. That's an unusual default, seeing that native default is to have Nagle turned on. Regardless of whether it makes sense to make this the default or not, if the documentation stated what the default is, I wouldn't have to guess.

I tried looking at the default by inserting the default options into a stream. This prints:

[ transport = UNDEFINED sourceEndpoint = NULL reuseAddress = false readQueueLowWatermark = NULL readQueueHighWatermark = NULL writeQueueLowWatermark = NULL writeQueueHighWatermark = NULL sendGreedily = NULL receiveGreedily = NULL sendBufferSize = NULL receiveBufferSize = NULL sendBufferLowWatermark = NULL receiveBufferLowWatermark = NULL sendTimeout = NULL receiveTimeout = NULL keepAlive = NULL noDelay = NULL debugFlag = NULL allowBroadcasting = NULL bypassNormalRouting = NULL leaveOutOfBandDataInline = NULL lingerFlag = NULL lingerTimeout = NULL keepHalfOpen = NULL metrics = NULL loadBalancingOptions = [ ] ]

This is not useful because I still can't see what settings are actually in effect.

@mattrm456
Copy link
Contributor

I agree. Defaults are documented in some cases, e.g. https://github.com/bloomberg/ntf-core/blob/main/groups/nts/ntsa/ntsa_endpointoptions.h, but not all. We should revisit each value-semantic "options" and "configuration" type and ensure all fields have documented defaults. I will make a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants