def __init__(self, host='localhost', port=8125, prefix=None, maxudpsize=512, ipv6=False):
    'Create a new client.'
    fam = (socket.AF_INET6 if ipv6 else socket.AF_INET)
    (family, _, _, _, addr) = socket.getaddrinfo(host, port, fam, socket.SOCK_DGRAM)[0]
    self._addr = addr
    self._sock = socket.socket(family, socket.SOCK_DGRAM)
    self._prefix = prefix
    self._maxudpsize = maxudpsize
Create a new client.
def __init__(self, host='localhost', port=8125, prefix=None, maxudpsize=512, ipv6=False):
    
    fam = (socket.AF_INET6 if ipv6 else socket.AF_INET)
    (family, _, _, _, addr) = socket.getaddrinfo(host, port, fam, socket.SOCK_DGRAM)[0]
    self._addr = addr
    self._sock = socket.socket(family, socket.SOCK_DGRAM)
    self._prefix = prefix
    self._maxudpsize = maxudpsize