module documentation

Undocumented

Function allowed_gai_family This function is designed to work in the context of getaddrinfo, where family=socket.AF_UNSPEC is the default and will perform a DNS search for both IPv6 and IPv4 records.
Function create_connection Connect to *address* and return the socket object.
Constant HAS_IPV6 Undocumented
Function _has_ipv6 Returns True if the system can bind an IPv6 address.
Function _set_socket_options Undocumented
def allowed_gai_family(): (source)

This function is designed to work in the context of getaddrinfo, where family=socket.AF_UNSPEC is the default and will perform a DNS search for both IPv6 and IPv4 records.

def create_connection(address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, source_address=None, socket_options=None): (source)

Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the global default timeout setting returned by :func:`socket.getdefaulttimeout` is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. An host of '' or port 0 tells the OS to use the default.

HAS_IPV6 = (source)

Undocumented

Value
_has_ipv6('::1')
def _has_ipv6(host): (source)

Returns True if the system can bind an IPv6 address.

def _set_socket_options(sock, options): (source)

Undocumented