Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2b07b0e

Browse files
committed
Closes #22249: use IPPROTO_TCP constant instead of SOL_TCP constant for getaddrinfo() proto param
1 parent c943e79 commit 2b07b0e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/library/socket.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ The :mod:`socket` module also offers various network-related services:
464464
connection to ``www.python.org`` on port 80 (results may differ on your
465465
system if IPv6 isn't enabled)::
466466

467-
>>> socket.getaddrinfo("www.python.org", 80, proto=socket.SOL_TCP)
467+
>>> socket.getaddrinfo("www.python.org", 80, proto=socket.IPPROTO_TCP)
468468
[(2, 1, 6, '', ('82.94.164.162', 80)),
469469
(10, 1, 6, '', ('2001:888:2000:d::a2', 80, 0, 0))]
470470

0 commit comments

Comments
 (0)