Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 191
Local address support.#100
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
0faa59a4b41aaa731dcf8a2faecb96cb8088fdc117cc4963e9cd0dee6285d29abb518f36acad7e634023379080529070ad04be66b91f4104e55fb6e9d9def2File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -143,7 +143,12 @@ async def open_tcp_stream( | ||
| port: int, | ||
| ssl_context: Optional[SSLContext], | ||
| timeout: TimeoutDict, | ||
| local_addr: Optional[bytes], | ||
| ) -> AsyncSocketStream: | ||
| # trio doesn't currently support specifying the local address; it will | ||
| # as of 0.16.1. | ||
| if local_addr: | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe a comment that it is currently supported in Also, what will our implementation change look like once trio support does land here? Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm adding a comment. I believe the code would just add something like | ||
| raise NotImplementedError() | ||
| connect_timeout = none_as_inf(timeout.get("connect")) | ||
| exc_map = { | ||
| trio.TooSlowError: ConnectTimeout, | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to check - Do we want
local_addrorsource_addrhere?What are trio, asyncio, and the sync stdlib using for their naming?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
asyncio uses
local_addr, trio useslocal_address, and the stdlib socket module usessource_address(and curio usessource_addr). There's really no consistency.