This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class EventListener: | |
| def __init__(self, uri): | |
| self.uri = uri | |
| self.on_message_callbacks = [] | |
| def on_message(self, callback): | |
| self.on_message_callbacks.append(callback) | |
| async def _notify_message_received(self, message): | |
| for callback in self.on_message_callbacks: |