-
-
Notifications
You must be signed in to change notification settings - Fork 350
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
Add high-level Listener interface #282
Conversation
No semantic changes
{memory,lockstep}_stream_pair are more useful
Now that we have a clear delineation between the high-level and low-level interfaces, this should go into the high-level interface.
Codecov Report
@@ Coverage Diff @@
## master #282 +/- ##
==========================================
+ Coverage 99.13% 99.16% +0.02%
==========================================
Files 76 79 +3
Lines 9269 9658 +389
Branches 655 686 +31
==========================================
+ Hits 9189 9577 +388
- Misses 62 63 +1
Partials 18 18
Continue to review full report at Codecov.
|
No more port=None or port="" or port=bytestring -- they're not useful and they can have weird/non-portable behavior. Also don't accept service names (port="http") -- it would work, but they aren't necessarily portable, I can't find evidence that anyone uses them, and they violate TOOWTDI. I'd rather not support things I wouldn't recommend using. Also don't allow host=None in open_tcp_stream -- this is redundant with the loopback address. I guess this *could* be useful in some weird case, but we can always add it back later if someone wants it.
Actually, it looks like we need to resolve #284 before adding server helpers, so I'm going to defer that part to another PR and get this in. |
Todo:
open_ssl_over_tcp_listeners
start_listening_server
(or maybespawn_listening_server
?)start_{tcp,ssl_over_tcp}_server
switch to preferring port=None instead of port=0 for "pick anever mind, see bpo-31198random port" (apparently python's getaddrinfo treats them the same)
maybe makeOTOH twisted and tornado don't and it makes How to handle automatic port selection in open_tcp_listeners when we have multiple sockets? #283 more complicated, so never mind. We can always add it later; it's a backwards compatible change.open_tcp_listeners
accept a list of host names? notsure if this is really useful. But asyncio supports it.