'Partition the ``addrinfo`` list by address family.
Returns two lists.  The first list contains the first entry from
``addrinfo`` and all others with the same family, and the
second list contains all other addresses (normally one list will
be AF_INET and the other AF_INET6, although non-standard resolvers
may return additional families).'

@staticmethod
def split(addrinfo):

    primary = []
    secondary = []
    primary_af = addrinfo[0][0]
    for (af, addr) in addrinfo:
        if (af == primary_af):
            primary.append((af, addr))
        else:
            secondary.append((af, addr))
    return (primary, secondary)
