File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1145,12 +1145,21 @@ convenient.
11451145
11461146 *sock * must be a non-blocking socket.
11471147
1148+ With :class: `SelectorEventLoop `, *address * does not need to be resolved:
1149+ for :const: `~socket.AF_INET ` and :const: `~socket.AF_INET6 ` sockets,
1150+ ``sock_connect `` first checks whether *address * is already resolved by
1151+ calling :func: `socket.inet_pton `, and uses :meth: `loop.getaddrinfo ` to
1152+ resolve it if it is not.
1153+
1154+ :class: `ProactorEventLoop `, the default event loop on Windows, does not
1155+ resolve *address *. The host must already be a numeric IP address; passing
1156+ a host name raises :exc: `OSError `. Resolve the address with
1157+ :meth: `loop.getaddrinfo ` first, or use :meth: `loop.create_connection `,
1158+ which resolves the address on every platform.
1159+
11481160 .. versionchanged :: 3.5.2
1149- ``address `` no longer needs to be resolved. ``sock_connect ``
1150- will try to check if the *address * is already resolved by calling
1151- :func: `socket.inet_pton `. If not,
1152- :meth: `loop.getaddrinfo ` will be used to resolve the
1153- *address *.
1161+ With :class: `SelectorEventLoop `, ``address `` no longer needs to be
1162+ resolved.
11541163
11551164 .. seealso ::
11561165
You can’t perform that action at this time.
0 commit comments