def send_persisted_messages(self, websocket):
        """
        This method is called immediately after a websocket is openend by the client, so that
        persisted messages can be sent back to the client upon connection.
        """
        for channel in self._subscription.channels:
            message = self._connection.get(channel)
            if message:
                websocket.send(message)

        This method is called immediately after a websocket is openend by the client, so that
        persisted messages can be sent back to the client upon connection.
        
ws4redis/subscriber.py