@@ -101,6 +101,7 @@ Client socket example with custom context and IPv4::
101101
102102 with socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) as sock:
103103 with context.wrap_socket(sock, server_hostname=hostname) as ssock:
104+ ssock.connect((hostname, 443))
104105 print(ssock.version())
105106
106107
@@ -1949,13 +1950,12 @@ to speed up repeated connections from the same clients.
19491950 The parameter ``server_side `` is a boolean which identifies whether
19501951 server-side or client-side behavior is desired from this socket.
19511952
1952- For client-side sockets, the context construction is lazy; if the
1953- underlying socket isn't connected yet, the context construction will be
1954- performed after :meth: `connect ` is called on the socket. For
1955- server-side sockets, if the socket has no remote peer, it is assumed
1953+ For client-side sockets, if *sock * is not yet connected, the underlying
1954+ SSL object is created when :meth: `~socket.socket.connect ` is called.
1955+ For server-side sockets, if the socket has no remote peer, it is assumed
19561956 to be a listening socket, and the server-side SSL wrapping is
19571957 automatically performed on client connections accepted via the
1958- :meth: `accept ` method. The method may raise :exc: `SSLError `.
1958+ :meth: `~socket.socket. accept ` method. The method may raise :exc: `SSLError `.
19591959
19601960 On client connections, the optional parameter *server_hostname * specifies
19611961 the hostname of the service which we are connecting to. This allows a
0 commit comments