mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Closes #22249: use IPPROTO_TCP constant instead of SOL_TCP constant for getaddrinfo() proto param
This commit is contained in:
parent
c943e79384
commit
2b07b0e868
1 changed files with 1 additions and 1 deletions
|
@ -464,7 +464,7 @@ The :mod:`socket` module also offers various network-related services:
|
|||
connection to ``www.python.org`` on port 80 (results may differ on your
|
||||
system if IPv6 isn't enabled)::
|
||||
|
||||
>>> socket.getaddrinfo("www.python.org", 80, proto=socket.SOL_TCP)
|
||||
>>> socket.getaddrinfo("www.python.org", 80, proto=socket.IPPROTO_TCP)
|
||||
[(2, 1, 6, '', ('82.94.164.162', 80)),
|
||||
(10, 1, 6, '', ('2001:888:2000:d::a2', 80, 0, 0))]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue