async def handler(self):
self.ws = await websockets.connect(self.url, ssl=self.ssl)<EOL>while self.ws:<EOL><INDENT>message = await self.ws.recv()<EOL>for handle in self.on_message:<EOL><INDENT>if asyncio.iscoroutinefunction(handle):<EOL><INDENT>await handle(self, message)<EOL><DEDENT>else:<EOL><INDENT>handle(self, message)<EOL><DEDENT><DEDENT><DEDENT>
Handle loop, get and process messages