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

local socket binding for TCPConnector #678

Merged
merged 6 commits into from
Feb 1, 2016

Conversation

akhomchenko
Copy link
Contributor

As discussed here:

https://groups.google.com/forum/#!topic/aio-libs/lM7IUZq3DNM

Please list tests that should be written.

@@ -697,6 +697,9 @@ TCPConnector
*ssl_context* may be used for configuring certification
authority channel, supported SSL options etc.

:param tuple local_addr: tuple of ``(local_addr, local_port)`` used to bind
Copy link
Member

Choose a reason for hiding this comment

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

Don't use markup here but update ./docs/client_reference.rst also.
(local_addr, local_port) should be (local_host, local_port) pair.

@asvetlov
Copy link
Member

I suggest the following test scenario:

  1. Select unused port on loopback (127.0.0.1) interface.
  2. Make http request with passing selected local_addr
  3. Check that socket from connector._conns transport has local_addr as sock.gethostname()

@asvetlov
Copy link
Member

Is it possible to use (0.0.0.0, 1234) and (127.0.0.1, 0) pairs for local_addr?

@akhomchenko
Copy link
Contributor Author

@asvetlov

As for:

(0.0.0.0, 1234)

0.0.0.0 was resolved to 127.0.0.1 in my case

(127.0.0.1, 0)

0 port is translated to first free port, so it would not be (127.0.0.1, 0)

@akhomchenko
Copy link
Contributor Author

@asvetlov looks like builds for Python 3.5 are broken

asvetlov added a commit that referenced this pull request Feb 1, 2016
local socket binding for TCPConnector
@asvetlov asvetlov merged commit a72c912 into aio-libs:master Feb 1, 2016
@asvetlov
Copy link
Member

asvetlov commented Feb 1, 2016

Thanks!

@akhomchenko akhomchenko deleted the feature/socket-binding branch February 1, 2016 20:37
@asvetlov asvetlov added this to the 0.21 milestone Feb 1, 2016
@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants