@classmethod
def get_listening_sockets(cls):
    """Return a list of all listening sockets

        >>> host.socket.get_listening_sockets()
        ['tcp://0.0.0.0:22', 'tcp://:::22', 'unix:///run/systemd/private', ...]
        """
    sockets = []
    for sock in cls(None)._iter_sockets(True):
        if sock[0] == 'unix':
            sockets.append('unix://' + sock[1])
        else:
            sockets.append('%s://%s:%s' % (sock[0], sock[1], sock[2]))
    return sockets
