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

Update documentation to explain redisConnectWithOptions. #1099

Merged
merged 1 commit into from
Sep 2, 2022

Conversation

michael-grunder
Copy link
Collaborator

Additionally document the new REDIS_OPT_PREFER_IPV4,
REDIS_OPT_PREFER_IPV6 as well as the rest of our existing options.

See #1096

Additionally document the new `REDIS_OPT_PREFER_IPV4`,
`REDIS_OPT_PREFER_IPV6` as well as the rest of our existing options.

See #1096
@michael-grunder michael-grunder merged commit cc7c35c into master Sep 2, 2022
@michael-grunder michael-grunder deleted the document-new-options branch September 2, 2022 01:40
| --- | --- |
| REDIS\_OPT\_NONBLOCK | Tells hiredis to make a non-blocking connection. |
| REDIS\_OPT\_REUSEADDR | Tells hiredis to set the [SO_REUSEADDR](https://man7.org/linux/man-pages/man7/socket.7.html) socket option |
| REDIS\_OPT\_PREFER\_IPV4<br>REDIS\_OPT\_PREFER_IPV6 | Informs hiredis to either prefer `IPV4` or `IPV6` when invoking [getaddrinfo](https://man7.org/linux/man-pages/man3/gai_strerror.3.html). Note that both of the options may be set at once, which will cause hiredis to spcify `AF_UNSPEC` in the getaddrinfo call, which means both `IPV4` and `IPV6` addresses will be searched simultaneously. |
Copy link
Contributor

@zuiderkwast zuiderkwast Sep 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

We could also add an option like REDIS_OPT_PREFER_IP_UNSPEC which we simply define as REDIS_OPT_PREFER_IPV4 | REDIS_OPT_PREFER_IPV6 and use this in the documentation. WDYT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I can add that.

michael-grunder added a commit that referenced this pull request Sep 2, 2022
michael-grunder added a commit that referenced this pull request Sep 2, 2022
Add REDIS_OPT_PREFER_UNSPEC

See: #1099, #1096

Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
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

Successfully merging this pull request may close these issues.

2 participants