Python Socket IPv6 (AF_INET6) Listen

Posted on May 5, 2019 at 12:32 am

Listen on an IPv6 address and port in Python with socket():

ADDR = (HOST, PORT)
serversock = socket.socket(family=socket.AF_INET6)
serversock.bind(ADDR)
serversock.listen(0)

Change HOST and PORT as needed.

Receive updates via email

Other Posts

Updated Posts