socket.has_dualstack_ipv6
Prev: socket.getservbyport | Up: socket | Next: socket.herror
Rel: socket.AddressFamily, socket.close, socket.create_connection, socket.create_server
Ref: docs.python.org — socket.has_dualstack_ipv6
Tags: #public #python3 #stdlib #socket
Import
import socket
from socket import has_dualstack_ipv6
Signature & Overview
socket.has_dualstack_ipv6()
Return True if the platform supports creating a SOCK_STREAM socket which can handle both AF_INET and AF_INET6 (IPv4 / IPv6) connections.
Usage
import socket
assert isinstance(socket.has_dualstack_ipv6(), bool)
Gotchas
- Check before passing
dualstack_ipv6=Truetocreate_server()on portable servers.
REPL Inspect
from socket import has_dualstack_ipv6
help(has_dualstack_ipv6)
Linked from
Related notes
- tuts/python3/stdlib_module/socket/getservbyport Linked here; links to this page; shared tags: #socket, #stdlib
- tuts/python3/stdlib_module/socket/herror Linked here; links to this page; shared tags: #socket, #stdlib
- tuts/python3/stdlib_module/socket/AddressFamily Linked here; shared tags: #socket, #stdlib
- tuts/python3/stdlib_module/socket/close Linked here; shared tags: #socket, #stdlib
- tuts/python3/stdlib_module/socket/create_connection Linked here; shared tags: #socket, #stdlib
- tuts/python3/stdlib_module/socket/create_server Linked here; shared tags: #socket, #stdlib
- tuts/python3/stdlib_module/socket/socket Linked here; shared tags: #socket, #stdlib
- tuts/python3/stdlib_module/socket links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/socket/dup shared tags: #socket, #stdlib
- tuts/python3/stdlib_module/socket/error shared tags: #socket, #stdlib