(self, family, addr)
return self._is_valid_ip_address(family, addr)
Convert packed IPv4/IPv6 address bytes to an human readable
        ASCII version
Convert packed IPv4/IPv6 address bytes to an human readable
        ASCII version
Convert packed IPv4 / IPv6 address bytes to an human readable ASCII version
def _convert_address(self, family, addr):
        """
        Convert packed IPv4/IPv6 address bytes to an human readable
        ASCII version
        """
        if family is socket.AF_INET:
            addr = b".".join(
                ("%i" % (byte_ord(b),)).encode("ascii") for b in addr
            )
        elif family is socket.AF_INET6:
            hexaddr = binascii.b2a_hex(addr)
            addr = b":".join(
                ("%x" % (int(hexaddr[b : b + 4], 16),)).encode("ascii")
                for b in range(0, 32, 4)
            )
        elif family == socket.AF_UNIX:
            return addr.rstrip(b"\x00")
        else:
            raise ProxyProtocolException(
                "Unknown INET family : {}".format(family)
            )

        return self._is_valid_ip_address(family, addr)
def _convert_address ( self , family , addr ) : if family is socket . AF_INET : addr = b"." . join ( ( "%i" % ( byte_ord ( b ) , ) ) . encode ( "ascii" ) for b in addr ) elif family is socket . AF_INET6 : hexaddr = binascii . b2a_hex ( addr ) addr = b":" . join ( ( "%x" % ( int ( hexaddr [ b : b + 4 ] , 16 ) , ) ) . encode ( "ascii" ) for b in range ( 0 , 32 , 4 ) ) elif family == socket . AF_UNIX : return addr . rstrip ( b"\x00" ) else : raise ProxyProtocolException ( "Unknown INET family : {}" . format ( family ) ) return self . _is_valid_ip_address ( family , addr )