-
-
Notifications
You must be signed in to change notification settings - Fork 335
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
Auto-resolve addresses in socket methods #377
Comments
njsmith
added a commit
to njsmith/trio
that referenced
this issue
Dec 21, 2017
njsmith
added a commit
to njsmith/trio
that referenced
this issue
Dec 21, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, one of the awkward differences between
socket
andtrio.socket
– really the last awkward difference as of v0.2.0 – is that withsocket
, you can pass hostnames directly to socket methods, likesock.bind(("localhost", 0))
orsock.connect(("python.org", 443))
. In Trio these methods currently require numeric addresses, and there are the extra methodsresolve_local_address
andresolve_remote_address
that do the resolution for you.This was always a little weird, and really the only compelling reason was because
bind
as synchronous. But it turns out thatbind
should be async after all (#241). So we might as well get rid of this last piece of weirdness.Plan:
bind
,connect
, etc. all callresolve_local_address
/resolve_remote_address
automatically as neededresolve_local_address
/resolve_remote_address
The text was updated successfully, but these errors were encountered: