@@ -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
@@ -2236,13 +2237,12 @@ to speed up repeated connections from the same clients.
22362237 The parameter ``server_side `` is a boolean which identifies whether
22372238 server-side or client-side behavior is desired from this socket.
22382239
2239- For client-side sockets, the context construction is lazy; if the
2240- underlying socket isn't connected yet, the context construction will be
2241- performed after :meth: `connect ` is called on the socket. For
2242- server-side sockets, if the socket has no remote peer, it is assumed
2240+ For client-side sockets, if *sock * is not yet connected, the underlying
2241+ SSL object is created when :meth: `~socket.socket.connect ` is called.
2242+ For server-side sockets, if the socket has no remote peer, it is assumed
22432243 to be a listening socket, and the server-side SSL wrapping is
22442244 automatically performed on client connections accepted via the
2245- :meth: `accept ` method. The method may raise :exc: `SSLError `.
2245+ :meth: `~socket.socket. accept ` method. The method may raise :exc: `SSLError `.
22462246
22472247 On client connections, the optional parameter *server_hostname * specifies
22482248 the hostname of the service which we are connecting to. This allows a
0 commit comments