Lines Matching refs:family
73 # where needed (e.g. .family property of a socket object).
100 """Convert a numeric family value to an IntEnum member.
136 errorTab[10046] = "Protocol family not supported."
137 errorTab[10047] = "Address family not supported by protocol family."
220 def __init__(self, family=-1, type=-1, proto=-1, fileno=None):
221 # For user code address family and type values are IntEnum members, but
226 if family == -1:
227 family = AF_INET
232 _socket.socket.__init__(self, family, type, proto, fileno)
248 s = "<%s.%s%s fd=%i, family=%s, type=%s, proto=%i" \
253 self.family,
283 sock = self.__class__(self.family, self.type, self.proto, fileno=fd)
295 sock = socket(self.family, self.type, self.proto, fileno=fd)
516 def family(self):
517 """Read-only access to the address family for this socket.
519 return _intenum_converter(super().family, AddressFamily)
540 def fromfd(fd, family, type, proto=0):
541 """ fromfd(fd, family, type[, proto]) -> socket object
547 return socket(family, type, proto, nfd)
595 def socketpair(family=None, type=SOCK_STREAM, proto=0):
596 """socketpair([family[, type[, proto]]]) -> (socket object, socket object)
600 The arguments are the same as for socket() except the default family is
603 if family is None:
605 family = AF_UNIX
607 family = AF_INET
608 a, b = _socket.socketpair(family, type, proto)
609 a = socket(family, type, proto, a.detach())
610 b = socket(family, type, proto, b.detach())
616 def socketpair(family=AF_INET, type=SOCK_STREAM, proto=0):
617 if family == AF_INET:
619 elif family == AF_INET6:
631 lsock = socket(family, type, proto)
637 csock = socket(family, type, proto)
654 socketpair.__doc__ = """socketpair([family[, type[, proto]]]) -> (socket object, socket object)
657 The arguments are the same as for socket() except the default family is AF_UNIX
876 def create_server(address, *, family=AF_INET, backlog=None, reuse_port=False,
882 *family* should be either AF_INET or AF_INET6.
900 if family != AF_INET6:
901 raise ValueError("dualstack_ipv6 requires AF_INET6 family")
902 sock = socket(family, SOCK_STREAM)
923 if has_ipv6 and family == AF_INET6:
945 def getaddrinfo(host, port, family=0, type=0, proto=0, flags=0):
955 The family, type and proto arguments can be optionally specified in order to
959 # We override this function since we want to translate the numeric family
962 for res in _socket.getaddrinfo(host, port, family, type, proto, flags):