[issue41169] socket.inet_pton raised when pass an IPv6 address like "[::]" to it
Wator Sead
report at bugs.python.org
Wed Jul 1 08:18:25 EDT 2020
Wator Sead <seahoh at gmail.com> added the comment:
[::] can be bound, but the resoult is [::1], you must use this address to connect. Excuse me, are you a developer of the Python?
>>> import socket
>>> ls = socket.socket(socket.AF_INET6)
>>> cs = socket.socket(socket.AF_INET6)
>>> ls.bind(('[::]', 888)) # no raise
>>> ls.listen(1)
>>> cs.connect(('[::1]', 888)) # no raise
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41169>
_______________________________________
More information about the Python-bugs-list
mailing list