◐ Shell
clean mode source ↗

PEP 748: tlslib - context & socket by Julien00859 · Pull Request #4960 · python/peps

@Julien00859

The `connect()` function is poorly named server-side as it actually
`bind()` the socket. Server-side the function lacks a `family` parameter
to support IPv6 without a DNS lookup.

Actually all three `connect()`, `bind()` and `listen()` socket function
are pretty low-level. The high-level `create_connection` (for `connect`)
and `create_server` (for `bind()` + `listen()`) are more pythonic. Wrap
the latter and not the former, also to remove the need of a `listen()`
method on the created socket (which is useless client-side).