📜  serversocket.accept() python 代码示例

📅  最后修改于: 2022-03-11 14:46:50.299000             🧑  作者: Mango

代码示例1
import socket

addr = ("", 8080)  # all interfaces, port 8080
if socket.has_dualstack_ipv6():
    s = socket.create_server(addr, family=socket.AF_INET6, dualstack_ipv6=True)
else:
    s = socket.create_server(addr)