def hostname(ip, reverse=False):
    try:
        result = socket.gethostbyaddr(str(ip))
        return result[0] if not reverse else result[2][0]
    except socket.error:
        return None
Sends state updates to remote servers.
dataset/ETHPy150Open allegro/ralph/src/ralph/lib/network/__init__.py/hostname--crossover with--dataset/ETHPy150Open matrix-org/synapse/synapse/handlers/presence.py/PresenceHandler._push_to_remotes