IPv6 question

John Burton john.burton at jbmail.com
Sun Feb 15 06:29:41 EST 2004


I'm not sure if this is a question about python socket support or sockets in
general ...

I have a socket server with which I want to accept incoming connections on
ipv4 and ipv6.
I've found that if I create the listening socket with
sock = socket(AF_INET, SOCK_STREAM)
it will accept connections on ipv4 (only) and if I create it with
sock = socket(AF_INET6, SOCK_STREAM)
it will accept connections with ipv6 (only)

Is there a way to make a single socket accept connections using both
protocols?
Or do I need create two sockets and listen on them both?





More information about the Python-list mailing list