feat(client): add RFC 8305 (Happy Eyeballs v2) support #255
+652
−42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement RFC 8305 as an alternative connection strategy alongside the existing RFC 6555 behavior. Default behavior remains RFC 6555 for backward compatibility. In order to enable Happy Eyeballs v2, one needs to call
HttpConnector::set_connection_attempt_delay().RFC 8305 improvements over RFC 6555:
Closes hyperium/hyper#2450
Open question: the current implementation maintains both v1 (RFC 6555) and v2 (RFC 8305), with v1 as the default for backward compatibility. However, do we really want to maintain v1, considering that Happy Eyeballs is an internal optimization and v2 achieves the same goal more effectively.