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

Allow passing a local address and address family to trio.open_tcp_stream #1642

Closed
ntninja opened this issue Jun 24, 2020 · 1 comment
Closed

Comments

@ntninja
Copy link

ntninja commented Jun 24, 2020

Given a DNS-name trio.open_tcp_stream currently has no way to limit the TCP connection to either IPv4 or IPv6 and has no way to bind the local socket to a specific interface or port. While this is not an issue in general and trio's native happy-eyeballs support is awesome, there are some advanced use cases where being more restrictive can be useful.

To that point there is currently a patch proposed for httpcore/httpx that allows overriding the local_addr and family parameters globally for a connection pool. It's missing trio support however as trio does not support the require parameters.

@njsmith
Copy link
Member

njsmith commented Jun 24, 2020

#275 is our canonical issue for discussing this feature – let's continue conversation there.

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