docs/library/socket: Use correct sockaddr variable name.
Signed-off-by: Dorukyum <doruk.ak@hotmail.com>
This commit is contained in:
parent
d263438a6e
commit
f4811b0b42
|
@ -29,7 +29,7 @@ returned by `getaddrinfo` function, which must be used to resolve textual addres
|
|||
# You must use getaddrinfo() even for numeric addresses
|
||||
sockaddr = socket.getaddrinfo('127.0.0.1', 80)[0][-1]
|
||||
# Now you can use that address
|
||||
sock.connect(addr)
|
||||
sock.connect(sockaddr)
|
||||
|
||||
Using `getaddrinfo` is the most efficient (both in terms of memory and processing
|
||||
power) and portable way to work with addresses.
|
||||
|
|
Loading…
Reference in New Issue