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

Connect options #254

Merged
merged 14 commits into from
Dec 14, 2022
Merged

Connect options #254

merged 14 commits into from
Dec 14, 2022

Conversation

jadamcrain
Copy link
Member

@jadamcrain jadamcrain commented Dec 14, 2022

Adds overloaded constructors for creating a TCP/TLS master channel that takes an opaque ConnectOptions. The new parameter provides a way to set:

  • An optional timeout that may be less than the OS default connect timeout. If not set, the behavior just reverts to the OS default timeout.
  • An optional local endpoint to bind the socket prior to connecting. This is useful in dual-homed systems with multiple NICs. If not provided, then the behavior reverts to all adapters and an OS specified port (0.0.0.0:0). Most users wishing to specify the IP of the adapter will chose to use 0 for a random available port from the OS, but manual port selection is possible as well.

This is a proposed way of addressing #245 and #244 without breaking backward compatibility. Some of the various options, like the retry paramters, could be merged in a future 2.0.

@jadamcrain jadamcrain added the enhancement New feature or request label Dec 14, 2022
@jadamcrain jadamcrain merged commit 20f25ff into main Dec 14, 2022
@jadamcrain jadamcrain deleted the feature/connect-options branch December 14, 2022 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant